Unity-Technologies / EditorXR

Author XR in XR
Other
925 stars 167 forks source link

Fix SpatialMenuElement warning present when entering play-mode #540

Closed dunity closed 5 years ago

dunity commented 5 years ago

Purpose of this PR

Fix SpatialMenuElement warning present when entering play-mode, due to a missing component on an object in the SpatialMenu prefab. This warning wasn't present outside of play-mode. This fix removes the abstract SpatialMenuElement component from one of the "Text" gameObjects in the SpatialMenu prefab hierarchy.

Testing status

Tested in various scenarios, and wasn't able to reproduce the issue.

Technical risk

Medium. Due to the SpatialMenu prefab being re-serialized, there could be unforeseen minor visual changes. That said, I didn't see any visual difference present when testing.

Comments to reviewers

Enter play-mode, and you no longer see the warning "The class named 'UnityEditor.Experimental.EditorVR.SpatialMenuElement' is abstract. The script class can't be abstract! UnityEditor.Experimental.EditorVR.Core.EditingContextManager:Awake()" logged from the DefaultScriptReferences class' Create() function.