protected virtual void OnDisable() { graph.onExposedParameterListChanged -= UpdateExposedParameters; graph.onExposedParameterModified -= UpdateExposedParameters; exposedParameterFactory?.Dispose(); // Graphs that created in GraphBehaviour sometimes gives null ref. exposedParameterFactory = null; }