private void Update() { if (!instance) { instance = this; } if (!levelHasInited) { editMode = false; } if (!targetGrid || !levelManager) { editMode = false; } UpdateStatesLogic(); }
void OnSceneGUI() { if (lvl == null) { //Debug.LogWarning("set instance of Level editor ... "); lvl = LevelEditor.instance; } if (lvl == null) { Debug.LogWarning("Level is not set a instance ... "); return; } Event e = Event.current; HandleKeys(e); }