Right now I have an Editor Script
with the function OnInspectorGUI
.
In my function I draw a GUILayout.Button
, but I only want to draw that button if it’s in the Play mode
. I don’t want it to run while editing.
How do I achieve this?
Right now I have an Editor Script
with the function OnInspectorGUI
.
In my function I draw a GUILayout.Button
, but I only want to draw that button if it’s in the Play mode
. I don’t want it to run while editing.
How do I achieve this?
Application.isPlaying
does the job.