protected void DestroyRenderObjects() { this.unityCamera.enabled = false; if (this.srcRenderTexture != null) { Service.Get <CameraManager>().ReleaseRenderTexture(this.srcRenderTexture, false); this.srcRenderTexture = null; } if (this.dstRenderTexture != null) { Service.Get <CameraManager>().ReleaseRenderTexture(this.dstRenderTexture, false); this.dstRenderTexture = null; } if (this.quadMesh != null) { UnityUtils.DestroyMesh(this.quadMesh); this.quadMesh = null; } if (this.quadMaterial != null) { UnityUtils.DestroyMaterial(this.quadMaterial); this.quadMaterial = null; } if (this.quadGameObject != null) { UnityEngine.Object.Destroy(this.quadGameObject); this.quadGameObject = null; this.quadMaterial = null; } }
private void CleanUp() { AnimController animController = Service.Get <AnimController>(); if (this.animAlphaIn != null) { animController.CompleteAnim(this.animAlphaIn); this.animAlphaIn = null; } if (this.animAlphaOut != null) { animController.CompleteAnim(this.animAlphaOut); this.animAlphaOut = null; } if (this.gameObject != null) { MeshFilter component = this.gameObject.GetComponent <MeshFilter>(); component.sharedMesh = null; } if (this.mesh != null) { UnityUtils.DestroyMesh(this.mesh); this.mesh = null; } if (this.gameObjectExists) { this.gameObject.SetActive(false); this.gameObjectExists = false; } this.gameObjectVisible = false; this.initialized = false; }
private static void DestroyMeshCombinerGameObject(GameObject gameObject) { MeshFilter component = gameObject.GetComponent <MeshFilter>(); UnityUtils.DestroyMesh(component.sharedMesh); UnityEngine.Object.Destroy(gameObject); }
public void DestroyFootprintMesh() { this.quads = null; if (this.mesh != null) { UnityUtils.DestroyMesh(this.mesh); this.mesh = null; } if (this.tiles != null) { UnityEngine.Object.Destroy(this.tiles); this.tiles = null; } }