Resources.Load problem

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?

It does work. I use a string array of file names.
What was the error message?

Not that this will possibly have any bearing but try thisString.ToString() instead, just curious, see if you get the same error, if the error goes away, I will know why it is happening, if you get the same error, then no clue.