Sorry for the stupid question!
Why do I get a NullReferenceException: Object reference not set to an instance of an object?
public class myTestClass
{
public string testString;
}
public class Test : MonoBehaviour
{
public myTestClass[] testedClassObject;
private void Start()
{
testedClassObject = new myTestClass[2];
testedClassObject[0].testString = "test"; // --> Error
}
}
I guess I need a constructor for the string in my class, but how should that look like?