- Home /
Values of a game object's children change when not supposed to
I have game objects as buttons to go in a certain level in a level select scene. I made a custom editor for a script that the buttons have. The custom editor draws a default inspector and adds a button that executes a function to change the values of it's children.
After I click the editor button and after it sets the values of it's children, I save the scene and open another scene. When I go back to the level select scene, the values of the button game object's children change back.
This might be a glitch, is there any way to fix this.
Sounds like the buttons are set to reinitialize those children objects onAwake() or onStart(). Could you be overwritting those values you saved, during this initialization?
Your answer
Follow this Question
Related Questions
How do you detect which child collider was hit? 6 Answers
Child-objects are not properly 'transformed' with parent 1 Answer
Add Explosion Force to children? 2 Answers
Instantiate as child, of child, of child... 3 Answers
accessing a child 1 Answer