I’m stucked with a next problem: I have a prefab “TestObject” and I need to instantiate it in runtime (it doesnt exist in the game initially). From all examples I had seen there are only one example given to everyone:
public GameObject prefab;
//...
Instantiate(prefab, new Vector3(x,y,z), Quaternion.identity) as GameObject;
//...
But I don’t know what prefab will be created so I can’t assign any value to it. Basically what I would like to do is create predefined cube and after say to it: “you gonna use model X”. Is that possible?