Question by
OctoMan · Jul 20, 2017 at 12:38 PM ·
editor-scriptinggenerationboolondrawgizmos
Disable Bools in OnDrawGizmos()
I have a bool, which i activate in Editor Mode.
public bool generate;
I want to call it some functions and deactivate it after completed using the OnDrawGizmos() function, so i can use it in Editor Mode NOT PlayMode.
void OnDrawGizmos()
{
if (generate)
{
ClearAll();
GenerateFloorTile();
GenerateGoals();
GeneratePlayers();
GenerateWalls();
generate = false;
}
}
After all function are completed i want to deactivate generate as seen above, which is working visually, but not truely. Because when i now press play. generate is still true I debugged it in Awake().
Whats the problem with that? Is there a better way to do it?
Comment