- Home /
Question by
UnityToMakeMoney · Mar 25, 2020 at 02:10 AM ·
c#unity 2dprefabsnested
Get Prefab In Nested Prefab
I am writing a script that needs to get a prefab within a nested prefab. Essentially I created a room prefab that uses wall and floor prefabs, but one of the prefabs named door is also within the nested prefab. How would I get the door prefab?
Comment
Answer by metalted · Mar 25, 2020 at 05:54 AM
So now i think about it, im not sure if prefab's children are visible, but otherwise you could use this : https://answers.unity.com/questions/183649/how-to-find-a-child-gameobject-by-name.html
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
can you access a script in a prefab and change its value 1 Answer