- Home /
How to find object references internally in a scene
Hi friends,
I have scenario like this.
I have many game objects in the hierarchy. May be more than 100.
I want to delete a game object in the scene.
Before deleting I want to confirm whether this game object is refeernced or assigned to other game object or script whicb is also in the same scene.
Can you please tell me how can do this? This will very useful for me to check for dependencies before doing any changes in the scene.
Answer by tahir ul nasir · Apr 30, 2015 at 06:47 PM
hi .i do not think so, we can check where this game Object is referenced in the Script .But We Can check in hierarchy if it is child or parent of some object through Find Child() or Get parent name
Answer by mobstgram · Oct 08, 2016 at 02:49 PM
This asset may help you. https://www.assetstore.unity3d.com/en/#!/content/69028
developer mentioned: - Prevent null reference from occurring when deleting GameObject - Easy to get to know dependency on hierarchy - Useful to refactor your scene
Your answer
Follow this Question
Related Questions
Why Unity crashes and how can I fix it? 0 Answers
Unwanted Cube GameOjbect gets generated upon playing any scene? 1 Answer
I have an error, script should check for null or not destroy game objects 2 Answers
good resource about conserving memory when multiple levels share resources? 0 Answers
make game objects not move in scene view 2 Answers