Greetings,
So I’ve been able to instantiate prefabs no problem within Unity that contain scripts, etc, no porblem. I just pass a string to resources.load();
so:
GameObject thisObject = (GameObject)Resources.Load(“thisObject”);
However, when I try to pass the object through a string variable rather than actually typing out the string, it can’t load the resource, and I get an error:
string thisString = “thisObject”;
GameObject thisObject = (GameObject)Resources.Load(thisString);
What am I doing wrong, and why can’t you pass a string variable instead of a string literal?