Hello i got a simple public class ,
but I don’t understand how can I add multiple objects as an array of that class.
As it’s public, in the editor I’ve set the size of the entities array, but I still can’t create objects.
I’m missing the obvious
public class entity{
public string name;
..
}
public entity[] entities;
entities[0].name="foobar"; //returns error "NullReferenceException: Object reference not set to an instance of an object"