fix: move ChangeScenario outside of loop, remove the discard modifier

This commit is contained in:
Aviv Cohn 2026-03-20 13:43:10 -04:00
parent e2cdb1238b
commit e003e4dc94

View file

@ -446,9 +446,9 @@ namespace PepperDash.Essentials.Core
{ {
Debug.LogMessage(LogEventLevel.Debug, this, "Unable to find partition with key: '{0}'", partitionState.PartitionKey); Debug.LogMessage(LogEventLevel.Debug, this, "Unable to find partition with key: '{0}'", partitionState.PartitionKey);
} }
// Sets the scenario while disregarding the returned task. This prevents current scenario from being null when starting in manual mode.
_ = ChangeScenario(scenario);
} }
// Activates the scenario to prevent _currentScenario from being null when starting in manual mode.
ChangeScenario(scenario);
} }
else else
{ {