Category: GameDev
- Voxel loot chest ()
Loot chest with gold lining. Feel free to use in free or commercial products, leaving credits to me.
- Login manager for GameSparks in Unity ()
Here you can grab free GameSparks login manager for your Unity game. It automatically logins player to GameSparks by his Device ID and then changes the scene.
- Free retro-style camera shader for Unity ()
Small shader for Unity, which I use in my games for drawing minimap. Add the component script below to GameObject with Camera and assign Material with this shader to it.
- Unity Typewriter effect for Text ()
Here is pretty simple Unity MonoBehaviour script that can be used to give Text typewriter effect with blinking cursor at the end. In the middle there is commented line that can fix moving when typing if you use Align on Center option.
- Unity AI Statemachine example ()
It is pretty simple and small realisation of statemachine for artifical intelligence in Unity based on MonoBehaviour Components to be able to set values for States in Inspector window. The Idle.cs is small example of working with Owner and States from inside of State.
- Unity | Smooth camera follow 2D ()
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 […]
- Unity | Match BoxCollider2D to sprite size ()
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 […]
- Unity | 2D Color Fade ()
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 = […]
- 7 Best Assets for Unity ()
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 […]