This commit is contained in:
SoulliesOfficial
2026-01-03 18:19:39 -05:00
parent 3bcd7c1cf8
commit 33b1795c1f
7387 changed files with 2762819 additions and 716926 deletions

View File

@@ -48,6 +48,8 @@ namespace Opsive.BehaviorDesigner.Editor.Controls.NodeViews
/// <param name="node">The node that the control represents.</param>
public override void AddNodeView(GraphWindow graphWindow, VisualElement parent, object node)
{
graphWindow.rootVisualElement.styleSheets.Add(Shared.Editor.Utility.EditorUtility.LoadAsset<StyleSheet>("9c6834c10d404ac4b95be745f4411f96")); // TaskStyles.uss
m_Node = node as IEventNode;
m_GraphWindow = graphWindow;
m_BehaviorTree = m_GraphWindow.Graph as BehaviorTree;
@@ -86,6 +88,10 @@ namespace Opsive.BehaviorDesigner.Editor.Controls.NodeViews
}
var connectedNode = m_GraphWindow.Graph.LogicNodes[m_Node.ConnectedIndex];
// The tree may not be initialized.
if (connectedNode.RuntimeIndex == ushort.MaxValue) {
return;
}
var taskComponents = m_BehaviorTree.World.EntityManager.GetBuffer<TaskComponent>(m_BehaviorTree.Entity);
var taskComponent = taskComponents[connectedNode.RuntimeIndex];
if (taskComponent.Status == TaskStatus.Success) {