Hi. I have been spending quite some time trying to figure out why I cant load this 3D model using Resources.Load. I have the following code:
GameObject handle = Resources.Load("Handle_Avon") as GameObject;
handle.name = "loaded";
I have checked everything a hundred times and they seem to be correct. even the model seems to be assigned to the gameobject since calling handle.name doesnt throw a NULL exception but it doesnt show up in the scene. what is going on here?
Never mind. found the answer. so first you load the model to a gameobject which somehow turns to a prefab which seems to reside in your project but hidden, then you instantiate that prefab/gameobject and assign it to another gameobject! so basically the whole code would end up looking like this: