mirror of
				https://github.com/maxartz15/VertexAnimation.git
				synced 2025-11-04 10:25:44 +01:00 
			
		
		
		
	Preview loaded animations
Preview to be loaded animations in the library.
This commit is contained in:
		
							
								
								
									
										40
									
								
								Editor/Scripts/Editor/VA_AnimationLibraryEditor.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								Editor/Scripts/Editor/VA_AnimationLibraryEditor.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEditor;
 | 
			
		||||
 | 
			
		||||
namespace TAO.VertexAnimation.Editor
 | 
			
		||||
{
 | 
			
		||||
	[CustomEditor(typeof(VA_AnimationLibrary))]
 | 
			
		||||
	public class VA_AnimationLibraryEditor : UnityEditor.Editor
 | 
			
		||||
	{
 | 
			
		||||
		private VA_AnimationLibrary library = null;
 | 
			
		||||
 | 
			
		||||
		void OnEnable()
 | 
			
		||||
		{
 | 
			
		||||
			library = target as VA_AnimationLibrary;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public override void OnInspectorGUI()
 | 
			
		||||
		{
 | 
			
		||||
			serializedObject.Update();
 | 
			
		||||
 | 
			
		||||
			InputGUI();
 | 
			
		||||
			EditorGUILayoutUtils.HorizontalLine(color: Color.gray);
 | 
			
		||||
			InfoGUI();
 | 
			
		||||
 | 
			
		||||
			serializedObject.ApplyModifiedProperties();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void InputGUI()
 | 
			
		||||
		{
 | 
			
		||||
			EditorGUILayout.PropertyField(serializedObject.FindProperty("animationBooks"));
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void InfoGUI()
 | 
			
		||||
		{
 | 
			
		||||
			using (new EditorGUI.DisabledScope(disabled: true))
 | 
			
		||||
			{
 | 
			
		||||
				EditorGUILayout.PropertyField(serializedObject.FindProperty("loadedAnimationsPreview"));
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Editor/Scripts/Editor/VA_AnimationLibraryEditor.cs.meta
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								Editor/Scripts/Editor/VA_AnimationLibraryEditor.cs.meta
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
fileFormatVersion: 2
 | 
			
		||||
guid: 257147ab6c1fe224784cbb0c5db92c6c
 | 
			
		||||
MonoImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  serializedVersion: 2
 | 
			
		||||
  defaultReferences: []
 | 
			
		||||
  executionOrder: 0
 | 
			
		||||
  icon: {instanceID: 0}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
		Reference in New Issue
	
	Block a user