I uploaded my unpublished on itch.io games, like VLR or Homeland and Democracy, because I don’t want them to be lost with time in the Web. I also made v3 of my Homeland and Democracy game, which fixed many bugs. Game is now playable again. My itch.io profile
Camera with this small script will follow Target with gap depending on its speed. using System.Collections; using UnityEngine; public class SmoothFollow2D : MonoBehaviour { public Transform Target; public Vector3 Offset; public float Velocity; public float MinDistance; // Update is called once per frame void LateUpdate() { if (Target == null) { return; } var targetPos […]
Small script, which can be useful for objects that changes sprites with multiple resolutions and sizes. public static void MatchToSize(GameObject obj, BoxCollider2D collider = null, SpriteRenderer renderer = null) { collider = collider ?? obj.GetComponent(); renderer = renderer ?? obj.GetComponent(); Vector2 S = renderer.sprite.bounds.size; collider.size = S; collider.offset = Vector2.zero; } UPD: Updated to support […]
Small script, that can be used to make color transition in given time. Can be used only for SpriteRenderer. using System; using UnityEngine; public class FadeExt { public static IEnumerator Fade(GameObject obj, Color startcolor, Color endcolor, float time, SpriteRenderer renderer = null, float tick = 0.01f) { renderer = renderer ?? obj.GetComponent(); var lespspeed = […]
Recently I’ve been asked to make a list of my favourite Unity assets. So, to begin with, these are 7 of my favourites! 1. NGUI– as Unity GUI is not that great and Unity 4.6 is still no there you should have a frameworks to make good and robust GUIs. NGUI has evolved greatly since […]