드래그 어긋나는거 수정
This commit is contained in:
30
Assets/Resources/SHI/UIToolkit/GantChartView.cs
Normal file
30
Assets/Resources/SHI/UIToolkit/GantChartView.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class GantChartView : EditorWindow
|
||||
{
|
||||
[SerializeField]
|
||||
private VisualTreeAsset m_VisualTreeAsset = default;
|
||||
|
||||
[MenuItem("Window/UI Toolkit/GantChartView")]
|
||||
public static void ShowExample()
|
||||
{
|
||||
GantChartView wnd = GetWindow<GantChartView>();
|
||||
wnd.titleContent = new GUIContent("GantChartView");
|
||||
}
|
||||
|
||||
public void CreateGUI()
|
||||
{
|
||||
// Each editor window contains a root VisualElement object
|
||||
VisualElement root = rootVisualElement;
|
||||
|
||||
// VisualElements objects can contain other VisualElement following a tree hierarchy.
|
||||
VisualElement label = new Label("Hello World! From C#");
|
||||
root.Add(label);
|
||||
|
||||
// Instantiate UXML
|
||||
VisualElement labelFromUXML = m_VisualTreeAsset.Instantiate();
|
||||
root.Add(labelFromUXML);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user