diff --git a/Assets/Scripts/Editor/InventoryPanelsPlayCapture.cs b/Assets/Scripts/Editor/InventoryPanelsPlayCapture.cs index 339e17bb7..d099d7b48 100644 --- a/Assets/Scripts/Editor/InventoryPanelsPlayCapture.cs +++ b/Assets/Scripts/Editor/InventoryPanelsPlayCapture.cs @@ -96,9 +96,24 @@ public static class InventoryPanelsPlayCapture SessionState.SetBool(Flag, false); EditorSceneManager.playModeStartScene = null; Log(code == 0 ? "PASS" : "FAILED"); + ClearDirtyAssets(); EditorApplication.Exit(code); } + // A play session modifies the assets it loads (render texture descriptors, material properties set from code) and the exit saves them. + // The capture leaves the project as it found it: the dirty flag of every persistent object is cleared first, and logged by path. + private static void ClearDirtyAssets() + { + var cleared = new SortedSet(); + foreach (var asset in Resources.FindObjectsOfTypeAll()) + { + if (!EditorUtility.IsPersistent(asset) || !EditorUtility.IsDirty(asset)) continue; + EditorUtility.ClearDirty(asset); + cleared.Add(AssetDatabase.GetAssetPath(asset)); + } + Log($"cleared the dirty flag of persistent assets: {(cleared.Count == 0 ? "none" : string.Join(", ", cleared))}"); + } + private static void Require(bool condition, string what) { if (!condition) throw new InvalidOperationException("assertion failed: " + what); diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset index 4d9191d4c..4787be7c3 100644 --- a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset +++ b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f1eead45000fe0fe0a6fce50b4d21ab2ff1ea25f5b390452116e0b04f28540a7 -size 536050 +oid sha256:f53586850a70c4f308e7e71b99b63881a49f38de4bd40f4edb7fe7ae6ecf8a52 +size 9748