Medieval Realms and BufferedImage

I’ve not posted any Unity build stuff recently (in fact since April 24th). I’ve been working away on an update for my plugin called Medieval Realms for the game Rising World. The update uses an API feature that takes screenshots of the users screen...

Concatenating Strings Best Practice

So I’ve always done it with the plus (+) operator turns out using a prefix $ is much more efficient in terms of memory usage. //less efficient string newString = firstString + ” said hello”; //more efficient string newString = $”{firstString}...

Public Variable vs Public Property

Remember to always use a public property over a public variable. Public variables such as below are potentially dangerous; //bad practice public float myFloat = 0.1f; Instead use; //public variable – the best solution public float myFloat { get; set; } Why use a...

Player Input

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 { } } }...

Lerp Lerp Lerp

Linear interpolation known as Lerp. Why it’s called Lerp I do not know! Is it L for “Linear” with an erp for ‘ERPolation? Who knows. Take three inputs. A start value, and end value, and a percentage value between the start and the end. // In...

Splat Prototypes is Obsolete

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;...