- Home /
Question by
ks13 · Dec 28, 2011 at 02:57 PM ·
gameobjectinstantiateempty
Instantianting Empty Object
Hello, i'm trying to create a GameObject with a MeshRenderer and TextMesh, without a actual prefab (already completed the instantiation with a prefab). But, i'm just having a problem understanding what to put into Instantiate(Object obj); so it creates an empty GameObject to which i could add Components. Can anyone tell me what i should put as "obj" to be able to do that?
Comment
Best Answer
Answer by TowerOfBricks · Dec 28, 2011 at 03:16 PM
I think you are looking for the GameObject constructor. http://unity3d.com/support/documentation/ScriptReference/GameObject.GameObject.html
new GameObject ("some name here", typeof(MeshRenderer), typeof(TextMesh));
Right, the basics, why haven't i thought of that? Thanks for re$$anonymous$$ding me of that.
Your answer
