using UnityEngine;
using UnityEditor;
[CustomEditor (typeof(customIns))]
class customIns : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
Texture txture = Resources.Load("file_name_without_extension");
GUILayout.Label(txture);
if (GUILayout.Button("Button"))
{
Debug.Log("It's alive: " + target.name);
}
}
}
沒有留言:
張貼留言