public bool Uninitialize() { DynamicLoaderManager.StopManager(); ResetMap(); DynamicLoader.OnDynamicLoad -= DynamicLoader_OnDynamicLoad; _actionReceiver.OnAction -= ActionReceiver_OnAction; NodeLock.WaitLockEdit(); try // We are now locked in edit { _native_camera.Debug(_native_context, false); _native_camera.Dispose(); _native_camera = null; _native_context.Dispose(); _native_context = null; _native_scene.Dispose(); _native_scene = null; _actionReceiver.Dispose(); _actionReceiver = null; } finally { NodeLock.UnLock(); } return(true); }
public bool Uninitialize() { if (!_initialized) { return(false); } // Stop manager DynamicLoaderManager.StopManager(); ResetMap(); // Remove actions DynamicLoader.OnDynamicLoad -= DynamicLoader_OnDynamicLoad; _actionReceiver.OnAction -= ActionReceiver_OnAction; NodeLock.WaitLockEdit(); try // We are now locked in edit { _native_camera.Debug(_native_context, false); _native_camera.Dispose(); _native_camera = null; _native_context.Dispose(); _native_context = null; _native_scene.Dispose(); _native_scene = null; _actionReceiver.Dispose(); _actionReceiver = null; } finally { NodeLock.UnLock(); } // Drop platform streamer GizmoSDK.Gizmo3D.Platform.Uninitialize(); _initialized = false; return(true); }