- Home /
Question by
Igor_Vasiak · Dec 19, 2017 at 04:08 PM ·
scripting problemspritecustom editor
Custom Editor Sprite Reseting During Playmode
I have a custom editor (lots of them, actually, but only this one has this problem) with two sprites:
behaviour.item.active = (Sprite)EditorGUILayout.ObjectField("Active Slot", behaviour.item.active, typeof(Sprite), false);
behaviour.item.inactive = (Sprite)EditorGUILayout.ObjectField("Inactive Slot", behaviour.item.inactive, typeof(Sprite), false);
I set them during Editor Mode, but once I hit play they get back to null sprites. Why? I don't call them anywhere else.
Comment
Your answer
Follow this Question
Related Questions
Can we make a script an Addressable in Unity ? 2 Answers
Sprite image not changing 0 Answers
Void OnTriggerEnter not working 1 Answer
Score sprites not reseting to zero after scene reloads. 1 Answer
Custom UnityEvent in Editor Window 1 Answer