void DestroyTexture() { if (_texture != null) { if (Application.isPlaying) RenderTexture.Destroy(_texture); else RenderTexture.DestroyImmediate(_texture); _texture = null; } }