Skip to content

Commit f99dff3

Browse files
Primed the core manager cache in MRM initialization by checking if they're valid.
1 parent 4d9f5cb commit f99dff3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Assets/MixedRealityToolkit/_Core/Managers/MixedRealityManager.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ private void Initialize()
175175
#endif
176176

177177
AddManager(typeof(IMixedRealityInputSystem), Activator.CreateInstance(ActiveProfile.InputSystemType) as IMixedRealityInputSystem);
178+
179+
if (InputSystem == null)
180+
{
181+
Debug.LogError("Failed to start the Input System!");
182+
}
178183
}
179184

180185
// If the Boundary system has been selected for initialization in the Active profile, enable it in the project
@@ -183,12 +188,22 @@ private void Initialize()
183188
AddManager(typeof(IMixedRealityBoundarySystem), Activator.CreateInstance(ActiveProfile.BoundarySystemSystemType) as IMixedRealityBoundarySystem);
184189
}
185190

191+
if (BoundarySystem == null)
192+
{
193+
Debug.LogError("Failed to start the Boundary System!");
194+
}
195+
186196
// If the Teleport system has been selected for initialization in the Active profile, enable it in the project
187197
if (ActiveProfile.IsTeleportSystemEnabled)
188198
{
189199
AddManager(typeof(IMixedRealityTeleportSystem), Activator.CreateInstance(ActiveProfile.TeleportSystemSystemType) as IMixedRealityTeleportSystem);
190200
}
191201

202+
if (TeleportSystem == null)
203+
{
204+
Debug.LogError("Failed to start the Teleport System!");
205+
}
206+
192207
if (ActiveProfile.RegisteredComponentsProfile != null)
193208
{
194209
for (int i = 0; i < ActiveProfile.RegisteredComponentsProfile.Configurations?.Length; i++)

0 commit comments

Comments
 (0)