A
A
artshelom2019-02-16 17:32:59
Unity
artshelom, 2019-02-16 17:32:59

When restarting the scene, the code does not work, how to fix it?

I restart the scene:

SceneManager.LoadScene(SceneManager.GetActiveScene().name);

The character that I controlled with the Joystick is not controlled and the objects do not appear, as they were before restarting the scene. Why could it happen?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Gaydak, 2019-02-16
@MrMureno

like how)) look at the error in the console .. all of a sudden there is
and there is still a possibility that you create some kind of DontDEstroy object with a link to Instance, and then recreated it a second time, but the link does not change ..
plus it’s not clear what kind of character you have , is there a network level)) what kind of control "with the help of Joystick")) nothing is clear at all))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question