private void OnDisable() { this.cameraMotorEditor = null; if (this.previewCamera != null) { DestroyImmediate(this.previewCamera.gameObject, true); } }
private void UpdateMotorType(ICameraMotorType motorType) { this.spCameraMotorType.objectReferenceValue = motorType; this.spCameraMotorType.objectReferenceValue.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy; this.cameraMotorEditor = (ICameraMotorTypeEditor)Editor.CreateEditor(this.spCameraMotorType.objectReferenceValue); serializedObject.ApplyModifiedProperties(); serializedObject.Update(); }