private static extern void Internal_Create(NativeCamera instance, IntPtr parentSO);
private void OnReset() { if (native != null) native.OnDestroy(); native = new NativeCamera(SceneObject); // Restore saved values after reset native.aspectRatio = serializableData.aspectRatio; native.nearClipPlane = serializableData.nearClipPlane; native.farClipPlane = serializableData.farClipPlane; native.fieldOfView = serializableData.fieldOfView; native.viewportRect = serializableData.viewportRect; native.projectionType = serializableData.projectionType; native.orthoHeight = serializableData.orthoHeight; native.clearColor = serializableData.clearColor; native.clearDepth = serializableData.clearDepth; native.clearStencil = serializableData.clearStencil; native.clearFlags = serializableData.clearFlags; native.priority = serializableData.priority; native.layers = serializableData.layers; native.main = serializableData.main; // TODO - Make RenderTexture a resource so I can save/restore it? }