Child Objects teleporting to (0,0,0) on scene load
So I have a scene where there are a lot of objects with child objects, and then those child objects have children, etc. I'm having a very weird issue where, when the scene loads, some child objects will teleport to position (0,0,0) while their parents stay put. This issue popped up literally randomly. I saved my project (scene included) without this issue happening, closed the project for the night, and opened it the next day to find this issue happening. Worse, every time this issue pops up, it's a different object being teleported. Has anyone else ran into this issue?
A temporary fix I found is to copy-paste all the objects into a new scene and save that scene over the old one, but the issue eventually pops up again. I tried building my project into an executable and running it, and the issue appears just as randomly.
My hypothesis is that the child object is, for whatever reason, being loaded before the parent object. This might cause unity to place the object at a default location (0,0,0) because it doesn't know where the child's parent is located. If this is the case, does anyone know of a way to enforce the loading order of my objects?
If this is not the case, does anyone have any idea what is happening here?
Answer by AnnoyingRain5 · May 02, 2016 at 10:23 AM
Try attaching a script that gets loaded before every other script and I don't have this issue myself
Your answer
![](https://koobas.hobune.stream/wayback/20220612075931im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
From tutorial: Camera rotates when making child of Player object. 1 Answer
ball rotates around another ball 1 Answer
OnParticleCollision() on parent script, for a child particle system? 2 Answers
Enable Multiple Box Collides From Parent Object 2 Answers
Child an Object to Another Objects Parent On Collision 1 Answer