diff --git a/XRTK-Core/Packages/com.xrtk.core/Editor/PackageInstaller.cs b/XRTK-Core/Packages/com.xrtk.core/Editor/PackageInstaller.cs index 16b37577a..9df935666 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Editor/PackageInstaller.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Editor/PackageInstaller.cs @@ -133,9 +133,10 @@ private static void AddConfigurations(List profiles) { AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate); + //Clear the selection to ensure the inspector does not cause errors, Empty try catch to avoid Unity crashing when Selection is null try { - Selection.activeGameObject = null; + Selection.activeObject = null; } catch { } @@ -199,9 +200,10 @@ private static string CopyAsset(this string rootPath, string sourceAssetPath, st /// The root profile to install the public static void InstallConfiguration(MixedRealityPlatformServiceConfigurationProfile platformConfigurationProfile, MixedRealityToolkitRootProfile rootProfile) { + //Clear the selection to ensure the inspector does not cause errors, Empty try catch to avoid Unity crashing when Selection is null try { - Selection.activeGameObject = null; + Selection.activeObject = null; } catch { }