Answer the question
In order to leave comments, you need to log in
How can I restart the object with all scripts?
I have an object (glass) that gets water into it and, with the proper amount of water, goes off-frame due to animation, how can I restart the glass with all the scripts without restarting the scene ?!
Answer the question
In order to leave comments, you need to log in
You can add a glass to a prefab and create a new glass when the old one leaves. And delete the old one. Or, if the water has physics, you can simply turn the glass over the screen until the water pours out and then move it back to its place, this will be less resource-intensive.
1. You can add a script to track the position. As soon as he reaches her behind the scenes, reset the parameters.
2. You can add a trigger behind the screen when hitting which the script resets the parameters.
3. You can make a destroy / instantiate when hitting a trigger behind the screen.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question