public void OnDestroy(agxSDK.Simulation simulation) { if (m_simulationStepEvents == null) { return; } simulation.remove(m_simulationStepEvents); m_simulationStepEvents.Dispose(); m_simulationStepEvents = null; }