Refresh preview.

Refresh animation library preview.
This commit is contained in:
max 2021-01-21 11:06:58 +01:00
parent 1afaa6d81f
commit 8d1120a826
2 changed files with 6 additions and 1 deletions

View File

@ -31,6 +31,11 @@ namespace TAO.VertexAnimation.Editor
private void InfoGUI() private void InfoGUI()
{ {
if (GUILayout.Button("Refresh Preview"))
{
library.OnValidate();
}
using (new EditorGUI.DisabledScope(disabled: true)) using (new EditorGUI.DisabledScope(disabled: true))
{ {
EditorGUILayout.PropertyField(serializedObject.FindProperty("loadedAnimationsPreview")); EditorGUILayout.PropertyField(serializedObject.FindProperty("loadedAnimationsPreview"));

View File

@ -38,7 +38,7 @@ namespace TAO.VertexAnimation
} }
} }
private void OnValidate() public void OnValidate()
{ {
Dictionary<string, VA_Animation> usedNames = new Dictionary<string, VA_Animation>(); Dictionary<string, VA_Animation> usedNames = new Dictionary<string, VA_Animation>();