We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4c32d0 commit a688f83Copy full SHA for a688f83
Runtime/Execution/UpdateBehavior.cs
@@ -98,6 +98,11 @@ private void UpdateStrategy()
98
/// <typeparam name="T">The type of update strategy to set.</typeparam>
99
private void SetStrategy<T>() where T : UpdateStrategy
100
{
101
+ // Do nothing if the strategy is already set to the given type
102
+ if (strategy is T) {
103
+ return;
104
+ }
105
+
106
// Unregister from the existing strategy
107
if (strategy != null) {
108
strategy.Unregister(OnUpdate);
0 commit comments