Hello!
I am trying to add a method, that is called when the node is deleted. For that, I want to call it in the Graph’s RemoveNode method.
I can’t figure out how to access methods in my I2Say : ActionTask<IDialogueActor> class with the node object, that is passed in
the public void RemoveNode(Node node, bool recordUndo = true) method.
This is probably a stupid question but I can’t seem to figure it out. I would be happy for any help!
I didn’t see node is type ActionNode. So I casted it into ActionNode and then took the action and casted it into I2Say, which is deriving from ActionTask:
ActionNode an = (ActionNode)node;
I2Say say = (I2Say)an.action;
say.RemoveTermReference();