0
Answered

How to use drive action in behavior subgraphs

MarkH 2 weeks ago in General Questions updated by Support 2 weeks ago 1

I want to use a Drive action on a behavior subgraph, but I don't know when and how to instantiate the drive. With drive on the blackboard of the subgraph, the drive will not be instantiated.


maingraph

Image 1304


subgraph

Image 1301


NullReferenceException: Object reference not set to an instance of an object

realvirtual.DriveToAction.OnStart () (at Assets/realvirtual/BehaviorGraph/DriveToAction.cs:27)

I have to override Axis in the main graph to create an instance of the drive:

Image 1303


But this is not what I want. I want to use the subgraph for a specific drive, without telling the subgraph all the time which drive. How can I create it?

Answered

We never used subgraphs - need to check - but I assume that this is so by design, you need to tell the subgraph everytime which drive. My personal opinion is that Graphs can be used for very simple things but in complexer controls it is much better to use c#