Skip to content

Commit 51c64dd

Browse files
author
Alexander Seeck
committed
Revert "Changed the order of checks since the platform can filter classes that might be null"
This reverts commit 8fe7aaa.
1 parent fb49bf5 commit 51c64dd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -618,15 +618,6 @@ public bool RegisterService<T>(Type interfaceType, SupportedPlatforms supportedP
618618
return false;
619619
}
620620

621-
#if !UNITY_EDITOR
622-
if (!Application.platform.IsPlatformSupported(supportedPlatforms))
623-
#else
624-
if (!UnityEditor.EditorUserBuildSettings.activeBuildTarget.IsPlatformSupported(supportedPlatforms))
625-
#endif
626-
{
627-
return false;
628-
}
629-
630621
if (interfaceType == null)
631622
{
632623
Debug.LogError("Unable to register a service with a null concrete type.");
@@ -639,6 +630,15 @@ public bool RegisterService<T>(Type interfaceType, SupportedPlatforms supportedP
639630
return false;
640631
}
641632

633+
#if !UNITY_EDITOR
634+
if (!Application.platform.IsPlatformSupported(supportedPlatforms))
635+
#else
636+
if (!UnityEditor.EditorUserBuildSettings.activeBuildTarget.IsPlatformSupported(supportedPlatforms))
637+
#endif
638+
{
639+
return false;
640+
}
641+
642642
T serviceInstance;
643643

644644
try

0 commit comments

Comments
 (0)