I have three scripts:
Level - Represents a Tile Based level.
LevelEditor - Custom Editor for Level.
Tile - A non monobehaviour class for storing tile information.
Level contains an array of Tiles to be allocated with 'new'. To avoid putting 'If array != null' everywhere in the code, I want to initialize the array simply to a size of 0 before anything else is ran.
However, I do not want this initialization to happen at run time, just only for editing purposes.
Is there some event I can use that will run before Level.OnDrawGizmos(), and also not be part of runtime code? Or is LevelEditor.OnEnable() the best I can do, with some checks in Level.OnDrawGizmos()?