by Yahwho | Jan 14, 2021 | Unity
Over the last few weeks (when not writing my Medieval Realms plugin) I’ve been spending a little time working out how to do 2D animation transitions in Unity. Here’s a little video. Currently there’s an idle animation, blink animation, walk...
by Yahwho | Nov 12, 2020 | Unity
So yeah. Two different ways. Not sure why one is better than the other. Yet. Method 1. Attach RigidBody2D to the Game Object and then create a local private variable in the script. This approach feels better imo, so that is what I’m using. RigidBody2d rb2d;...
by Yahwho | Apr 24, 2020 | Unity
public class ButtonInput : MonoBehaviour { void Update () { bool down = Input.GetKeyDown(KeyCode.Space); bool held = Input.GetKey(KeyCode.Space); bool up = Input.GetKeyUp(KeyCode.Space); if(down) { } else if(held) { } else if(up) { } else { } } }...
by Yahwho | Apr 22, 2020 | Unity
58 lines of C# code to create 5000 “magic” cubes. I’ve been learning a lot over the last three weeks about terrain generation and manipulation of terrain data. So I thought it was about time to actually cover the basics! Cube Controller using...
by Yahwho | Apr 21, 2020 | Unity
So it looks as though after learning all about SplatPrototype’s in Unity it turns out that the SplatPrototype is now depreciated! The (old) method I (just) learned using Unity 2018 goes something like: SplatPrototype[] newSplatPrototypes;...
by Yahwho | Apr 18, 2020 | Unity
Adding some basic water for the first time.