MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

SceneInfoUtils pokes every ScriptableObject in project on load, causing Awake to be called

Open keveleigh opened this issue 5 years ago • 4 comments

Describe the bug

It seems like a potential editor perf concern that all scriptable objects are loaded any time the asset database is reloaded. It also might cause unexpected behavior, if Awake is expecting to be called when it's actually in a valid use context instead of at database reload.

Microsoft.MixedReality.Toolkit.Input.MixedRealityControllerMappingProfile:Awake() (at Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityControllerMappingProfile.cs:129)
UnityEditor.AssetDatabase:LoadAssetAtPath(String)
Microsoft.MixedReality.Toolkit.Editor.ScriptableObjectExtensions:GetAllInstances() (at Assets/MixedRealityToolkit/Extensions/EditorClassExtensions/ScriptableObjectExtensions.cs:65)
Microsoft.MixedReality.Toolkit.Editor.SceneInfoUtils:RefreshSceneInfoFieldsInScriptableObjects() (at Assets/MixedRealityToolkit/Inspectors/PropertyDrawers/SceneInfoUtils.cs:296)
Microsoft.MixedReality.Toolkit.Editor.SceneInfoUtils:InitializeOnLoad() (at Assets/MixedRealityToolkit/Inspectors/PropertyDrawers/SceneInfoUtils.cs:229)

To reproduce

Steps to reproduce the behavior:

  1. Create a scriptable object that does something noticeable in its Awake
  2. Open your project
  3. View the action / log

keveleigh avatar Feb 26 '20 18:02 keveleigh

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

stale[bot] avatar Jul 25 '20 19:07 stale[bot]

This issue has been closed by an automated process because it is stale. If this is still an issue please add a new comment with more recent details and repro steps.

stale[bot] avatar Aug 29 '20 08:08 stale[bot]

Related to https://github.com/microsoft/MixedRealityToolkit-Unity/issues/8188

keveleigh avatar Aug 31 '20 16:08 keveleigh

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

stale[bot] avatar Apr 17 '22 04:04 stale[bot]

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!

IssueSyncBot avatar Jan 13 '24 01:01 IssueSyncBot