XRTK / com.xrtk.sdk

The SDK assets for the XRTK
https://github.com/XRTK/XRTK-Core
MIT License
9 stars 3 forks source link

Prefab saving issue with DefaultDiagnosticsWindow prefab #120

Closed SimonDarksideJ closed 4 years ago

SimonDarksideJ commented 4 years ago

XRTK - Mixed Reality Toolkit Bug Report

Describe the bug

In a project consuming the 0.1.28 packages, the following error occurs in the Console when building.

Saving Prefab to immutable folder is not allowed: Packages/com.xrtk.sdk/Features/Diagnostics/Prefabs/DefaultDiagnosticsWindow.prefab
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

If you also open the Prefab from the editor, it locks up and spams the console with the following error:

ArgumentException: Saving Prefab to immutable folder is not allowed: 'Packages/com.xrtk.sdk/Features/Diagnostics/Prefabs/DefaultDiagnosticsWindow.prefab'
UnityEditor.PrefabUtility.ValidatePath (UnityEngine.GameObject instanceRoot, System.String path) (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.PrefabUtility.SaveAsPrefabAssetArgumentCheck (UnityEngine.GameObject instanceRoot, System.String path) (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.PrefabUtility.SaveAsPrefabAsset (UnityEngine.GameObject instanceRoot, System.String assetPath, System.Boolean& success) (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.Experimental.SceneManagement.PrefabStage.SavePrefab () (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.Experimental.SceneManagement.PrefabStage.SavePrefabWithVersionControlDialogAndRenameDialog () (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.Experimental.SceneManagement.PrefabStage.AutoSave () (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.Experimental.SceneManagement.PrefabStage.HandleAutoSave () (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.Experimental.SceneManagement.PrefabStage.Update () (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.SceneManagement.StageNavigationManager.ValidateAndUpdatePrefabStages (System.Boolean showDialogIfInvalid) (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.SceneManagement.StageNavigationManager.Update () (at <83a73882c51c4602b3d34743827d03e7>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Delegate.DynamicInvokeImpl (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Delegate.DynamicInvoke (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <83a73882c51c4602b3d34743827d03e7>:0)

To Reproduce

Create a new project and import the XRTK. Any attempt to build or "look" at the "DefaultDiagnosticsWindow" prefab causes the issue.

FejZa commented 4 years ago

This one is really annoying by now. Haven't really checked it out yet but I get a feeling it's related to TextMesh Pro eventually.

StephenHodgson commented 4 years ago

Closed by #135 ?

SimonDarksideJ commented 4 years ago

Will need testing in the next package release to confirm

SimonDarksideJ commented 4 years ago

Tested with new SDK release, position is worse. Now it can cause Unity to go into an infernal loop

StephenHodgson commented 4 years ago

How's this bug?

StephenHodgson commented 4 years ago

What platform are you building out to?

StephenHodgson commented 4 years ago

Seems as though the prefab is missing the default font assets

image

StephenHodgson commented 4 years ago

We should really remove any prefabs from the SDK package outright and copy them much like we do with the profiles