- Home /
Everytime I hit play a gameobject reverts to its prefab values.
I created a prefab for a power up item. I try tyo to adjust the values in the inspector after I drag it into the scene but whenever I hit play, these values revert back to what they are in the prefab. At first, I thought it must have been the logic in my script but that's not the case at all. Whatever values I set on the prefab to are, without fail, what every copy of it I drag into the scene becomes when I hit play. I am wondering if maybe a script I created that accesses the unity editor (using UnityEditor) is causing the problem. Any help anyone can give will be greatly appreciated.
$$anonymous$$aybe unpacking the prefab would fix it, though that's not ideal. Try to figure out when the values get reverted by debugging the values. See https://docs.unity3d.com/2020.2/Documentation/$$anonymous$$anual/ExecutionOrder.html
Answer by ryo310 · Aug 07, 2020 at 03:01 PM

I think you can just press the area surrounded by black and click Apply all.
You must press it when you make changes in the prefab state.
I'm Japanese, so my English might not be right.
Answer by Fkat · Aug 07, 2020 at 05:37 PM
@ryo310 Your English is good but the problem I'm having isn't with the prefab its self so overriding, unfortunately won't fix the problem . I want the copies of the power up prefab to have different effects according to how I adjust their values in the inspector. I don't want all the copies to have the same values but even after I adjust them they default to the prefab values whenever I hit play.
I apologize for giving you a different answer. If it's okay, could you take a video of your current situation and show it to me? Then it will be easier to understand.
Your answer