NodeCanvas is a complete Visual Behaviour Authoring framework to create advanced AI and Logic, including three separate, fully featured modules for you to choose and easily add in your game:
Behaviour Trees
State Machines
Dialogue Trees
Highlighted Features
Design reactive Behaviour Trees and Hierarchical State Machines within an intuitive, designer friendly visual node editor:
(Full Undo/Redo, Zoom In/Out, Multi-selection, Duplication, Copy/Pasting, Import/Export and more)
Communicate local & global variables visually or in code, for creating reusable and actor-centric parametrizable AI behaviours, optionaly saving and loading variables state between gaming sessions.
See how your behaviours react with advanced, colorful and informative runtime debugging for direct feedback.
Live Edit everything while in play mode to perfectly understand your design goals and how to achieve them.
Extend NodeCanvas Framework to create your own Actions, Conditions, Nodes or even completely new modules with the ease of a powerful, clean and well documented API.
Utilize any existing code directly with advanced and extremely fast Reflection Tasks, automaticaly integrating Unity’s and 3rd Party asset APIs.
Work with Lists/Arrays, Enums, Interfaces and pretty much ANY Variable Type you need out-of-the-box.
React to world changes and transfer data using the built-in Event System.
Reuse and Bind made behaviours amongst any number of different agents.
Organize your designs using Behaviour Sub-Trees and Sub-State Machines.
Perform exceptional.
Publish to all Unity platforms out-of-the-box.
Integrate with Playmaker able to Sync Variables and lot’s of other great assets.
Congrats on release. Demo video looks great. Heading over to asset store to buy. Been waiting for this for a while. Hope this asset is really successful for you.
The online documentation has been updated for Actions, Conditions, Nodes and Systems…Here is how to create a Action Task for example:
using UnityEngine;
[Category("My Super Actions")]
public class MyAction : ActionTask<Transform> {
//To allow use of either direct value or blackboard variable. Something like Playmaker
public BBParameter<Vector3> translateBy;
//Optional.Called once a new agent is set. Think Awake. Return an error string or null
protected override string OnInit(){
return null;
}
//Optional.Called once
protected override void OnExecute(){
agent.Translate(translateBy.value);
EndAction(true);
}
//Optional.Called per frame if the Action has not ended.
protected override void OnUpdate(){
}
}
Would it be possible to have a node graph at runtime (using the same OnGUI() methods for renderering). If not, is it possible to extend the base code to do so? The use case would be for a node-graph based design tool, made with Unity.
Hey,
While it’s possible to see a graph in Play mode in the editor, it’s not possible to do so in build game. Basicaly because there are many unity editor methods used (helpboxes, dialogs, handles etc). I could make it possible to show a kind of striped version though in the future, but I first have to finish the Dialogue Tree and the FSM systems of NodeCanvas
I tried this and it gives a compile error: “The type or namespace name `ActionTask’ could not be found. Are you missing a using directive or an assembly reference?”
This is happening because ActionTask is a javascript class, and EmptyAction is a C# class. As far as I know, you can’t have C# classes extend JavaScript classes since they are compiled with different compilers. I don’t know of any way to get around this.
If this is true, then this tool cannot be used with existing projects that are written in C#. I would strongly recommend making a C# version of NodeCanvas, since C# is used far more in Unity projects.
Hello,
You will have to move some folders into the Plugins folder.
Please wait for an update I’ve just pushed in which I relocated the folder structure a bit to make this easier along with some fixes, improvements and more Tasks.
Im very excited to say that I’ve just submited version 1.2. Now that’s a big version change you might think, but I really think it deserves. here is why:
The UI has been overhauled, to be more informative, nice and free up space for bigger graphs.
The nodes now only read the info that is needed, while the controls for each node or connection and assigned Actions and Condition Tasks are shown in the new inline inspector area on the top left when a node or connection is selected.
The FSM System is introduced as promised!
It can hold other nested FSM systems or nested Behaviour Trees. So that a Behaviour Tree can be a State of an FSM System for example. The FSM works with the same Actions and Conditions. Create once and reuse in all systems.
The Dialogue Tree System is also here!
Create non-linear, GUI agnostic Dialogues, usable from any GUI system, since it works with the new included event system (Demo UI included).
Using the already included Blackboard feature, it is possible to create Dialogues in which Dialogue Actors are able to remember things.
Again, use the same Actions and Conditions. Create once and reuse in all systems.
Finalized Blackboard Save/Load
The Blackboards variables can be saved and load at any time in game just by calling Save, or Load on the blackboard. It can also be set to automaticaly load OnAwake and save OnDestroy!
More Action Condition Tasks Included
Usable with any system. Notably, I’ve included actions for Mecanim contol.
Behaviour Tree Fix Improvements
Fixed the Parallel Node to work as expected
Fixed Random Selector and added Random Sequencer as well. Both of which it’s possible to visually debug…
Many more Fixes and Improvements
Especially in the Editor UI controls
The documentation on www.nodecanvas.com is now being written for the new systems, as well as expanded for Behaviour Trees. New videos will soon follow
This is an excellent update. I was following along with your development, unsure how I’d use this (I either code or use Playmaker) myself, but your addition of a ‘Dialogue System’ is making this very attractive now. I think you’re best suited to showcasing more ‘practical demo’s’ like that, rather than trusting people to fully appreciate what a BT can do for them…I didn’t necessarily so, and you won me over!
Hey Steven. Thanks
I’m glad you like the update! Yes it’s true that Behaviour Trees are a bit specialized and thus the new FSM and Dialogue Systems which are easier to find a more… practical and direct use. But hey, BTs are powerful
I hope to get some new videos up soon, showcasing the new systems, alone or even in conjuction with one another.
Hopefully before the update goes live.
I really want to like this product, it has great potential. I was happy to see with your version you provide some support for C# users, allowing them to move some of the javascript files into the plugins folder so that ActionTasks and ConditionTasks can be overridden by C# classes.
However, after playing with this for a while, I eventually ran into another brick wall:
I wanted to write my own decorators for my behavior trees - for example, one that would interrupt a running child node when a blackboard key was set. Alas, this is not possible in C#. In fact, it is not possible to create any new behavior tree nodes in C# since they must appear in the “availableNodes” list in the BTContainer javascript class.
I guess at this point my only option would be to rewrite the behavior tree node system in C#, which is only two dozen files - but still is a pain.
Again, I highly recommend providing a C# version of this product. Since 95% of Unity users code in C#, I bet you would have a much higher adoption rate…
At long last I’ve converted the whole NodeCanvas package to C#. I guess that was the way to go from the start. I’m really sorry if some of you have made progress with the current existing version, but all is for the better
There have been a lot of improvements in the process as well.
With that heavy load of porting and workflow improvements I wanted and are now done, I am finaly so excited to start making video tutorials for all aspects of NodeCanvas, updating knowledge base and generally illustrate what it really is. The workflow has much improved to a point that the last video is now almost obsolete
I am submiting the new version tomorrow first thing!
Cool. Do you get the source code? I notice that the Asset store files preview shows all js scripts. This makes me nervous
Is there a demo/limited version i can test? Good work.
I bought it anyway Looks like we get the source, very nice. It’s all still JS though. I presume your c# conversion takes time to appear on the asset store?