From 3f2e6d82c90d3895e6c7601c3365d7cb6e35c0ec Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 25 Mar 2026 18:44:56 +0100 Subject: [PATCH] Fix regression from 21e2c830e5e85f3e8cb852658fdc7930c74d3208 when reimport Animation #3937 --- Source/Editor/Windows/Assets/AnimationWindow.cs | 3 +++ Source/Editor/Windows/Assets/AssetEditorWindow.cs | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/Source/Editor/Windows/Assets/AnimationWindow.cs b/Source/Editor/Windows/Assets/AnimationWindow.cs index 8dbcc5921..69da1f9e9 100644 --- a/Source/Editor/Windows/Assets/AnimationWindow.cs +++ b/Source/Editor/Windows/Assets/AnimationWindow.cs @@ -431,6 +431,9 @@ namespace FlaxEditor.Windows.Assets _isWaitingForTimelineLoad = true; base.OnItemReimported(item); + + // Drop virtual asset state and get a new one from the reimported file + LoadFromOriginal(); } /// diff --git a/Source/Editor/Windows/Assets/AssetEditorWindow.cs b/Source/Editor/Windows/Assets/AssetEditorWindow.cs index eeac84b60..93d6c850c 100644 --- a/Source/Editor/Windows/Assets/AssetEditorWindow.cs +++ b/Source/Editor/Windows/Assets/AssetEditorWindow.cs @@ -527,6 +527,16 @@ namespace FlaxEditor.Windows.Assets return false; } + /// + /// Loads the asset from the original location to reflect the state (eg. after original asset reimport). + /// + protected virtual void LoadFromOriginal() + { + _asset = LoadAsset(); + OnAssetLoaded(); + ClearEditedFlag(); + } + /// protected override T LoadAsset() {