- Home /
Question by
taumechanicum · Apr 13, 2020 at 04:04 PM ·
editor-scriptingplaymodeassign-variable
Why is assignment in editor cleared on play
I have written a script in the editor that will automatically assign gameobjects to some public variables in some other gameobjects (nodes above, below, left, and right of a node). However, when I press play, all the variables get cleared and set to none. How do I avoid this?
Comment
Your answer
Follow this Question
Related Questions
DestroyImmediate(component.gameObject) destroys component but not gameObject 1 Answer
Editor script: Changes made to another script are ignored in Play Mode 0 Answers
Keep track of how many times the editor goes into play mode? 2 Answers
How to know which material is used by a submesh in script ? 0 Answers