Are you creating your own node system?
You are probably using an old version of NC and that is why you are getting the error of EditorUtils parsing the public property. This has been changed and properties are no longer parsed.
Regarding creating a whole tree through code, the current API has some limitations especialy when it comes to assigning Task (actions, conditions). If you are creating your onw system where you wont use tasks, then you probably wont have any difficulties. It depends on the system.
The API for creating trees from code in runtime will be improved in the future to be faster (for example make use of generics)
You can connect 2 nodes together with ConnectNode(Node, Node). Here is an example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using UnityEngine;
publicclassCreateTree:MonoBehaviour{
publicGraph graph;
voidStart(){
varnode1=graph.AddNewNode(typeof(MyNode));
varnode2=graph.AddNewNode(typeof(MyNode));
graph.ConnectNode(node1,node2);
}
}
Using ConnectNode, node2 will be connected to the last port index of node1.