Finalize by subscribing to the new boot init order

This commit is contained in:
Michal Pikulski
2025-10-16 14:32:07 +02:00
parent 1891aaa85d
commit c7906a9968
6 changed files with 175 additions and 52 deletions

View File

@@ -98,14 +98,9 @@ namespace Bootstrap
// Notify the BootCompletionService that boot is complete
if (Application.isPlaying)
{
// We use reflection to avoid direct reference in case the service is disabled/removed
var type = System.Type.GetType("Bootstrap.BootCompletionService, Assembly-CSharp");
if (type != null)
{
var method = type.GetMethod("HandleBootCompleted",
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
method?.Invoke(null, null);
}
// Direct call to boot completion service
Debug.Log("[CustomBoot] Calling BootCompletionService.HandleBootCompleted()");
BootCompletionService.HandleBootCompleted();
}
}
@@ -123,14 +118,9 @@ namespace Bootstrap
// Notify the BootCompletionService that boot is complete
if (Application.isPlaying)
{
// We use reflection to avoid direct reference in case the service is disabled/removed
var type = System.Type.GetType("Bootstrap.BootCompletionService, Assembly-CSharp");
if (type != null)
{
var method = type.GetMethod("HandleBootCompleted",
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
method?.Invoke(null, null);
}
// Direct call to boot completion service
Debug.Log("[CustomBoot] Calling BootCompletionService.HandleBootCompleted()");
BootCompletionService.HandleBootCompleted();
}
}