T
T
TooMajot2022-03-01 20:06:07
Unity
TooMajot, 2022-03-01 20:06:07

How to solve this problem in Unity?

Hello, I have a question:
I have: And also there is an object (cube) on the stage, we throw it into xObject. If you delete the cube, then it will also be deleted in "xObject". Is there a way to keep the cube in an xObject when it is removed from the stage, and without using prefabs? If something is not clear, I will clarify.
[SerializeField] private GameObject xObject;


Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GFX Data, 2022-03-01
@ShockWave2048

You can just turn it off, and then turn it on when you need it.
xObject.SetActive(false);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question