private void OnDestroy() { Debug.Log("OnDestroy"); MonitorKeyGen.ReleaseKey(key); key = -1; if (_MonitorRoot != null) { GameObject.Destroy(_MonitorRoot); } // 明示的に破棄 if (this.renderTexture) { RenderTexture.ReleaseTemporary(this.renderTexture); } }