private void DestroyRenderTexture() { if (renderTargetListener != null) { renderTexture.RemoveListener(renderTargetListener); renderTargetListener.Dispose(); renderTargetListener = null; } if (viewport != null) { viewport.Dispose(); viewport = null; } if (camera != null) { camera.Dispose(); camera = null; } renderTexture = null; if (texture != null) { texture.Dispose(); texture = null; } }
protected override void OnDetach() { //base.OnDetach(); //fix akunitbuy and akcustomize INCIN if (spawner.Spawned != null) { spawner.Spawned.SetForDeletion(false); spawner.Spawned = null; } if (rmCamera != null) { rmCamera.Dispose(); rmCamera = null; } }
protected override void OnDetach() { //base.OnDetach(); if (spawner.Spawned != null) { spawner.Spawned.SetForDeletion(false); spawner.Spawned = null; } if (rmCamera != null) { rmCamera.Dispose(); rmCamera = null; } }