A
A
Alexander Belov2020-06-03 19:27:34
Unity
Alexander Belov, 2020-06-03 19:27:34

unity. Why did the child object appear behind the parent (not even behind it, but in it)?

Hello! I'm learning how to make games, I'm not experienced yet and I don't understand a lot. My problem: the child object of the gun started to be displayed behind the parent object both in the game and in the editor, although this was not the case before. Everything is in 2D. You can see it in the Prefab too:
5ed7cb3e4034f470414185.png

If you look in 3D, you can see that it is displayed as if on a par with the parent:
5ed7cc35f23ca257038088.png
The child object does not move along the Z axis at all. Only if you make this object not a child, then you can somehow edit it normally, but I would like to leave this gun as a child object.

The only thing is that if you open the prefab and change at least something on the child object, then it will display normally in the prefab, even if you return the values ​​\u200b\u200bthat were, but this does not change anything in the game and in the editor.
5ed7cd0ca81a8078412293.png
5ed7cd14244fb891800142.png

This happened when I loaded another scene, edited it as I needed, and after loading this scene, with a character and a gun, such a defect appeared.

I did not find on the Internet either a collision with this problem or a solution, so I got desperate and decided to ask myself.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question