AlicizaX/Client/Packages/com.alicizax.uxtool/Editor/UXGUI/SceneView/UIEditWindow/UXComponentCreateWindow.cs
陈思海 5862fb2af1 add
1.新增手柄相关适配
2.新增设备重映射绑定
3.新增设备映射图标更新
2025-12-09 20:31:44 +08:00

35 lines
1.0 KiB
C#

using System;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
namespace AlicizaX.UXTool
{
public class UXComponentCreateWindow : EditorWindow
{
public void SetCreateData(string path, System.Action callback)
{
uxCreateWindowVisualAsset.SetCallBack(path, callback);
}
private UXCreateWindowVisualAsset uxCreateWindowVisualAsset;
private void CreateGUI()
{
uxCreateWindowVisualAsset = new UXCreateWindowVisualAsset();
rootVisualElement.Add(uxCreateWindowVisualAsset);
}
}
public static class UXComponentCreateWindowHelper
{
public static void ShowWindow(string path, Action createCallBack)
{
UXComponentCreateWindow window = EditorWindow.GetWindow<UXComponentCreateWindow>(true, "创建组件");
window.maxSize = new Vector2(400, 150);
window.minSize = new Vector2(400, 150);
window.Show();
window.SetCreateData(path, createCallBack);
}
}
}