microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
5.99k stars 2.12k forks source link

"Dirty flag" in Scene is not set correctly when modifying MixedRealityToolkit configuration profiles #4497

Closed SarahSexton closed 5 years ago

SarahSexton commented 5 years ago

Describe the bug

When opening an example scene from MRTK v2.0.0 in Unity 2018.3.14f1 and changing the configuration of the MixedRealityToolkit, the scene is not marked as dirty from the custom Inspector UI (https://docs.unity3d.com/ScriptReference/EditorUtility.SetDirty.html). Without further changes in the scene, Unity does not realize the changes in the scene, and therefore does not ask the user to save the changes. If the user reloads the scene, the changes have to be done again.

To reproduce

Steps to reproduce the behavior:

  1. Open an MRTK v2 Eye Tracking Demo scene in Unity 2018.3 (Reproducible with Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Scenes/mrtk_eyes_05_Visualizer.unity)
  2. Configure a Mixed Reality Toolkit Configuration Profile
  3. Select a configuration profile
  4. See the fact that Unity does not set a "*" flag indicating that changes have been made.
  5. Switching to a different scene will not prompt the user to save changes.
  6. Only workaround is changing something else in the scene unrelated to the profile to set the dirty flag.

Expected behavior

The dirty flag should be set correctly to indicate a change has been made after configuring the profile.

Your Setup

Target Platform

Troy-Ferrell commented 5 years ago

Testing in stabilization branch now. Modifying the active profile for a MRTK monobehavior does mark the scene as dirty.

Changing properties in the profile will not mark the scene dirty. This is expected because any changes will update the associated profile scriptable object which is not a per-scene change.