- Home /
how would I "child" an un-rendered object?
Hello, How would I take a object in my project view and render it in the Hierarchy then attach it to a parent, in code without using the unity editor in any way?
Answer by Berenger · Feb 15, 2012 at 03:56 AM
To instantiate an objects from the asset folder, it must be in a folder named Resources, the you can use Resources.Load. To set his parent, use transform.parent = ...
Or, ins$$anonymous$$d of Resources, make it a prefab (the Unity term for "spawnable".)
You do have to manipulate the editor for that. But, I admit, "in any way" seems a bit restrictif !
Your answer
Follow this Question
Related Questions
Make a simple tree 1 Answer
Parenting Transforms, Must (still) Set Parent at 0,0,0 ? 1 Answer
How do make a Instantiated prefab a child of exsisting Object? 3 Answers
Make object A parent of object b 1 Answer
Children Overproducing 1 Answer