public void InitializeDebugPlane() { if (EnvironmentSettings.DEBUG && sceneData.parcels != null && sceneDebugPlane == null) { sceneDebugPlane = new SceneDebugPlane(sceneData, gameObject.transform); } }
public void RemoveDebugPlane() { if (sceneDebugPlane != null) { sceneDebugPlane.Dispose(); sceneDebugPlane = null; } }
public void Cleanup(bool immediate) { if (isReleased) { return; } if (sceneDebugPlane != null) { sceneDebugPlane.Dispose(); sceneDebugPlane = null; } DisposeAllSceneComponents(); if (DCLCharacterController.i) { DCLCharacterController.i.characterPosition.OnPrecisionAdjust -= OnPrecisionAdjust; } if (immediate) //!CommonScriptableObjects.rendererState.Get()) { RemoveAllEntitiesImmediate(); } else { if (entities.Count > 0) { this.gameObject.transform.position = EnvironmentSettings.MORDOR; this.gameObject.SetActive(false); RemoveAllEntities(); } else { Destroy(this.gameObject); } } isReleased = true; }