Plugins - Better disable features on dispose

This commit is contained in:
Robert committed 2021-08-21 23:58:41 +02:00
1 parent 6a929cdcc0
commit c08e4a49a3
1 file changed
+2 -11
+2 -11
View File
@@ -75,7 +75,8 @@ namespace Artemis.Core
/// </param> /// </param>
protected virtual void Dispose(bool disposing) protected virtual void Dispose(bool disposing)
{ {
if (disposing) InternalDisable(); if (disposing)
SetEnabled(false);
} }
/// <summary> /// <summary>
@@ -104,16 +105,6 @@ namespace Artemis.Core
Profiler.StopMeasurement("Update"); Profiler.StopMeasurement("Update");
} }
internal void StartRenderMeasure()
{
Profiler.StartMeasurement("Render");
}
internal void StopRenderMeasure()
{
Profiler.StopMeasurement("Render");
}
internal void SetEnabled(bool enable, bool isAutoEnable = false) internal void SetEnabled(bool enable, bool isAutoEnable = false)
{ {
if (enable == IsEnabled) if (enable == IsEnabled)