Mar 11 2021 07:01 AM - edited Mar 11 2021 07:03 AM
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)
Mar 11 2021 09:13 AM
@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.
Mar 11 2021 09:55 AM
Mar 11 2021 10:01 AM - edited Mar 11 2021 10:24 AM
@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
Apr 10 2021 11:46 PM
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...
Apr 12 2021 11:46 PM