I have the first scene where the player and the ground are, then when the player enters the house I have the second scene, then I thought of copying and pasting the player of the first scene in the second scene so that the script code remains the same , so now if from the first scene the player changes a variable in the script when he enters the second scene does it change there too or does it stay the same? Thanks in advance for your answers.
Asked
Active
Viewed 16 times
0
-
Why not rather use e.g. [`DontDestroyOnLoad`](https://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html) and carry your existing player into any scene? Or alternatively look at other solutions from [How to pass data between scenes in Unity](https://stackoverflow.com/questions/32306704/how-to-pass-data-between-scenes-in-unity) – derHugo Jul 04 '21 at 14:25
-
because I tried but it didn't work – Ale Jul 04 '21 at 14:34