I have a nice object pooling script written in JS but I need C#. I’ve been teaching myself C# and don’t know jack about JS, so I’m going through it slowly. I’ve come to a few lines where I don’t quite understand their function or how to convey it in C#:
static var instance : EasyObjectPool;
function Start () {
instance = this;
Particularly, I don’t understand the first line. It’s not really like anything I’ve seen in C# before. EasyObjectPool is the name of the script this code is in. I’d post the full script but this “instance” variable is only used in these lines, so I don’t figure the rest is necessary. The JS code is calling “instance” a variable (right…?) but I don’t know what to call it in C#.
Any input is appreciated