XRTK / com.xrtk.core

The Official Mixed Reality Framework for Unity
https://xrtk.io
MIT License
309 stars 34 forks source link

FileNotFoundException: Could not load file or assembly 'XRTK.WindowsMixedReality.Inspectors' or one of its dependencies #451

Closed SimonDarksideJ closed 4 years ago

SimonDarksideJ commented 4 years ago

XRTK - Mixed Reality Toolkit Bug Report

Describe the bug

In testing the new Mapping validation and looking to add another provider, there seems to be a compilation issue which prevents the use of the SystemType drop down, primarily in:

Mixed Reality Config -> Input Profile -> Controller Data Providers.

But this affects ANY use of the System Type drop down currently.

FileNotFoundException: Could not load file or assembly 'XRTK.WindowsMixedReality.Inspectors' or one of its dependencies
System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, System.Boolean refonly) (at <7d97106330684add86d080ecf65bfe69>:0)
System.AppDomain.Load (System.String assemblyString) (at <7d97106330684add86d080ecf65bfe69>:0)
(wrapper remoting-invoke-with-check) System.AppDomain.Load(string)
System.Reflection.Assembly.Load (System.String assemblyString) (at <7d97106330684add86d080ecf65bfe69>:0)
XRTK.Inspectors.PropertyDrawers.TypeReferencePropertyDrawer.GetFilteredTypes (XRTK.Attributes.SystemTypeAttribute filter) (at Packages/com.xrtk.core/Inspectors/PropertyDrawers/TypeReferencePropertyDrawer.cs:77)
XRTK.Inspectors.PropertyDrawers.TypeReferencePropertyDrawer.DrawTypeSelectionControl (UnityEngine.Rect position, UnityEngine.GUIContent label, System.String& classRef, XRTK.Attributes.SystemTypeAttribute filter) (at Packages/com.xrtk.core/Inspectors/PropertyDrawers/TypeReferencePropertyDrawer.cs:212)
XRTK.Inspectors.PropertyDrawers.TypeReferencePropertyDrawer.DrawTypeSelectionControl (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, XRTK.Attributes.SystemTypeAttribute filter) (at Packages/com.xrtk.core/Inspectors/PropertyDrawers/TypeReferencePropertyDrawer.cs:257)
XRTK.Inspectors.PropertyDrawers.TypeReferencePropertyDrawer.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at Packages/com.xrtk.core/Inspectors/PropertyDrawers/TypeReferencePropertyDrawer.cs:411)
UnityEditor.PropertyDrawer.OnGUISafe (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyDrawer.cs:23)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:139)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:106)
UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:208)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9341)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9325)
XRTK.Inspectors.Profiles.InputSystem.MixedRealityControllerDataProviderProfileInspector.OnInspectorGUI () (at Packages/com.xrtk.core/Inspectors/Profiles/InputSystem/MixedRealityControllerDataProviderProfileInspector.cs:106)
UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:462)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This also has a relation to #431 where if a platform is not loaded and you try to add a new Data Provider, the SystemType drop down will not work due to missing platforms already configured in the default (this can be worked around by making a custom profile and removing them, but a user should not have to do this)

To Reproduce

  1. Go to "Mixed Reality Config -> Input Profile -> Controller Data Providers"
  2. Expand a Data Provider or add a new one
  3. Try to use the 'Data Provider Type' drop down
  4. See error

Expected behavior

A list of filters types should appear

Actual behavior

Reported error in console, drop down does not open.

SimonDarksideJ commented 4 years ago

Ok ignore, this seems to be some freak Unity thing, reloading the asmdf's and cleaning the project cleared the issue

StephenHodgson commented 4 years ago

I was gonna say, it sounds like the assembly was failing to be loaded properly.

But it would be nice to understand how it can happen and possibly mitigate this error or fix it in the future.