thekiwicoder0 / UnityBehaviourTreeEditor

Behaviour Tree Editor for Unity built with UIToolkit
MIT License
273 stars 57 forks source link

How did you get uxml and uss? #16

Closed Stellar-F0X closed 2 months ago

Stellar-F0X commented 2 months ago

In the BehaviourTreeEditorWindow.cs file, where are the XML and USS objects assigned in lines 50-52? I've searched through the source code, but I couldn't find any references where the XML and USS fields are assigned, which makes me quite curious.

public VisualTreeAsset behaviourTreeXml;
public VisualTreeAsset nodeXml;
public StyleSheet behaviourTreeStyle;
Oddlaceguy49 commented 2 months ago

You must use unity version 2023.2 or higher for UI Toolkit to work.

EDIT: Nevermind, misunderstood.

Oddlaceguy49 commented 2 months ago

I haven’t touched this code for a while but I know that the referenced files do exist. I believe they are set in the unity editor itself.

Stellar-F0X commented 2 months ago

image

https://docs.unity3d.com/Manual/UIE-manage-asset-reference.html Thank you. I found it!