OldBlueWater/BlueWater/Assets/PixelHeroes/Scripts/Editor/CharacterEditorEditor.cs

23 lines
594 B
C#
Raw Normal View History

2023-09-26 06:24:34 +00:00
using Assets.PixelHeroes.Scripts.EditorScripts;
using UnityEditor;
using UnityEngine;
namespace Assets.PixelHeroes.Scripts.Editor
{
/// <summary>
/// Adds "Refresh" button to CharacterEditor script.
/// </summary>
[CustomEditor(typeof(CharacterEditor))]
public class CharacterEditorEditor : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
if (GUILayout.Button("Refresh"))
{
((CharacterEditor) target).SpriteCollection.Refresh();
}
}
}
}