Unity overwrites prefab values in runtime
My game is a 2d platformer.
The PlayerInputManager in the new InputSystem is spawning my PlayerObject when a player joins.
During runtime this playerobject has some values changed (naturally), like position and maxSpeed, but sometimes when i stop Playmode, the value changes persist. this is a critical issue for me, as the player spawns wrong sometimes and I have to manually edit the prefab every time i start over. It also ruined my "sprinting" feature, because it saved the current value on exit for some reason.
I have double, triple, quadruple checked that I do not refer to the gameObject itself when editing values in the PlayerController script.
I have no freaking clue what is causing this but my game is unusable while this issue persists.
Your answer
Follow this Question
Related Questions
Using Prefab Information in a Class? 0 Answers
Polybrush won't save to prefab 1 Answer
How to make a prefab a parent to other prefabs? 1 Answer
Instantiate prefab on inspector drop 0 Answers