private void OnCompilationStarted(object obj) { if (Hexagon.IsCreated) { Hexagon.Dispose(); } }
private void OnPlayModeStateChanged(PlayModeStateChange obj) { if (obj == PlayModeStateChange.ExitingEditMode) { if (Hexagon.IsCreated) { Debug.Log("Disposed Hexagon"); Hexagon.Dispose(); } _isTransitioningMode = true; } else { _isTransitioningMode = false; } }
private void OnDestroy() { Hexagon.Dispose(); }