Send Event to c# script not received

laurien

New member
Hi,

Sorry for the basic question. I'm just testing the Send Event, as I need a behavior tree to trigger a C# function. I've set it up so that the behavior tree and C# test script are on the same game object.

Here is is the behavior tree:
BDTree.png

And here is my test script:
TestScript.png

The target gameobject in the BehaviorTree is set to the gameobject Test, which I've just set to itself (which has the behavior tree and test script attached).

The ReceivedEvent function isn't being called. Have I misunderstood the docs?

Thanks,
Laurien
 
In your code MyEvent has one parameter, but within the SendEvent task of your behavior tree you are not sending any parameters.
 
Top