มาเริ่มกันเลย
1. ก่อนอื่นเลยครับ ให้ทำการสร้าง Folder Editor
2. ใน Folder Editor ให้ทำการสร้าง C# Script (DataPanelEditor.cs)
3. จากนั้นทำการเพิ่ม Script
using UnityEngine;
using UnityEditor;
public class DataPanelEditor : EditorWindow
{
[MenuItem("DataPanel/Show")]
static void Init()
{
GetWindow(typeof(DataPanelEditor));
}
void OnGUI()
{
// ส่วนสำหรับว่า UI ใน Panel
GUILayout.Label("Hello World");
if (GUILayout.Button("Click Me"))
{
Debug.Log("Click Me");
}
}
}
NO GAME NO DREAM !!!