fix: SimulationRunner也补SendMessage(Awake)

This commit is contained in:
tian 2026-06-12 16:18:25 +08:00
parent fb6c4c7c12
commit 6bbad9155a

View File

@ -74,6 +74,7 @@ namespace CounterDrone.Unity
Debug.Log($"4. Recommendation: {rec.Best.RecommendedAerosolType}, {rec.Best.Platforms.Count} guns, prob={rec.Best.InterceptProbability:P0}"); Debug.Log($"4. Recommendation: {rec.Best.RecommendedAerosolType}, {rec.Best.Platforms.Count} guns, prob={rec.Best.InterceptProbability:P0}");
var runner = gameObject.AddComponent<SimulationRunner>(); var runner = gameObject.AddComponent<SimulationRunner>();
runner.SendMessage("Awake", SendMessageOptions.DontRequireReceiver);
runner.LoadAndStart(taskId); runner.LoadAndStart(taskId);
runner.Engine.TimeScale = 10f; runner.Engine.TimeScale = 10f;