-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using UnityEditor; | ||
using UnityEngine; | ||
using UnityEngine.UIElements; | ||
using UnityEditor.UIElements; | ||
|
||
|
||
public class EmptyEditorWindow : EditorWindow | ||
{ | ||
[MenuItem("Window/UI Toolkit/EmptyEditorWindow")] | ||
public static void ShowExample() | ||
{ | ||
EmptyEditorWindow wnd = GetWindow<EmptyEditorWindow>(); | ||
wnd.titleContent = new GUIContent("EmptyEditorWindow"); | ||
} | ||
|
||
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); | ||
|
||
// Import UXML | ||
var visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/GraphViewBehaviorTree/Editor/EmptyEditorWindow.uxml"); | ||
VisualElement labelFromUXML = visualTree.Instantiate(); | ||
root.Add(labelFromUXML); | ||
|
||
// A stylesheet can be added to a VisualElement. | ||
// The style will be applied to the VisualElement and all of its children. | ||
var styleSheet = AssetDatabase.LoadAssetAtPath<StyleSheet>("Assets/GraphViewBehaviorTree/Editor/EmptyEditorWindow.uss"); | ||
VisualElement labelWithStyle = new Label("Hello World! With Style"); | ||
labelWithStyle.styleSheets.Add(styleSheet); | ||
root.Add(labelWithStyle); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Label { | ||
font-size: 20px; | ||
-unity-font-style: bold; | ||
color: rgb(68, 138, 255); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<engine:UXML | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:engine="UnityEngine.UIElements" | ||
xmlns:editor="UnityEditor.UIElements" | ||
xsi:noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd" | ||
> | ||
<engine:Label text="Hello World! From UXML" /> | ||
</engine:UXML> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
using UnityEngine; | ||
|
||
namespace GraphViewBehaviorTree | ||
{ | ||
public class Node : MonoBehaviour { } | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using NUnit.Framework; | ||
using UnityEngine; | ||
using UnityEngine.TestTools; | ||
|
||
namespace GraphViewBehaviorTree.Editor.Tests | ||
{ | ||
public class GraphViewBehaviorTreeEditorTest | ||
{ | ||
// A Test behaves as an ordinary method | ||
[Test] | ||
public void GraphViewBehaviorTreeEditorTestSimplePasses() | ||
{ | ||
// Use the Assert class to test conditions | ||
} | ||
|
||
// A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use | ||
// `yield return null;` to skip a frame. | ||
[UnityTest] | ||
public IEnumerator GraphViewBehaviorTreeEditorTestWithEnumeratorPasses() | ||
{ | ||
// Use the Assert class to test conditions. | ||
// Use yield to skip a frame. | ||
yield return null; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "jameslafritz.GraphViewBehaviorTree.Editor.Tests", | ||
"rootNamespace": "GraphViewBehaviorTree.Editor.Tests", | ||
"references": [ | ||
"GUID:0bfbb1bb60202024991fa3f551e4c375", | ||
"GUID:922ce05479b8c274b9825ae27a7f8f0c", | ||
"GUID:2ee67a4da0cfd084998069b2b2ba2f71", | ||
"GUID:27619889b8ba8c24980f49ee34dbb44a", | ||
"GUID:0acc523941302664db1f4e527237feb3" | ||
], | ||
"includePlatforms": [ | ||
"Editor" | ||
], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": false | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.