Error When trying to open 'Advanced Properties' section of Tap to Place script

Copper Contributor

Also, the 'magnetic surfaces' section does not show up in the 'Advanced Properties' section of the Tap to Place script. I have tried this with multiple objects and nothing is working. This is the error log that I get from Unity (2021.4.21):  

 

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorGUILayout.IsChildrenIncluded (UnityEditor.SerializedProperty prop) (at <208995a09fe148f5a6f6c571838c154f>:0)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[] options) (at <208995a09fe148f5a6f6c571838c154f>:0)
Microsoft.MixedReality.Toolkit.Utilities.Editor.Solvers.TapToPlaceInspector.RenderAdvancedProperties () (at Library/PackageCache/com.microsoft.mixedreality.toolkit.foundation@4db221506e06-1615388068739/SDK/Editor/Inspectors/Utilities/Solvers/TapToPlaceInspector.cs:118)
Microsoft.MixedReality.Toolkit.Utilities.Editor.Solvers.TapToPlaceInspector.RenderCustomInspector () (at Library/PackageCache/com.microsoft.mixedreality.toolkit.foundation@4db221506e06-1615388068739/SDK/Editor/Inspectors/Utilities/Solvers/TapToPlaceInspector.cs:99)
Microsoft.MixedReality.Toolkit.Utilities.Editor.Solvers.TapToPlaceInspector.OnInspectorGUI () (at Library/PackageCache/com.microsoft.mixedreality.toolkit.foundation@4db221506e06-1615388068739/SDK/Editor/Inspectors/Utilities/Solvers/TapToPlaceInspector.cs:72)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <208995a09fe148f5a6f6c571838c154f>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

 

5 Replies

@theod_l Is the Magnetic Surfaces section supposed to show up under the Advanced Properties section of the Tap To Place script? I just tested with both MRTK 2.5.4 and 2.6.0, and I don't see it there. As far as I know, it's just a separate script called SurfaceMagnetism that you add to the game object.

 

https://docs.microsoft.com/en-us/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/solver...

 

screenshot.png

@theod_l Sure enough 🤷🏻‍ btw, I get the same Unity warning message when I expand the Advanced Properties section. It's not just you. I'm using Unity 2019.4.21f with MRTK 2.6.0

 

This seems to be an issue in the TapToPlace inspector script in the MRTK. I've created an issue and will submit a pull request.
Tap to Place inspector issue (advanced properties) · Issue #9645 · microsoft/MixedRealityToolkit-Uni... 

This is now fixed and will be in the next release.