Hi,
I’ve searched the docs and the forums and cannot figure out how to do this. I’m creating a custom node. I just want to get a component of the gameobject that the graph is connected to.
Looking for something like This.GetComponent().myVariable;
protected override void Definition()
{
startState = ControlInput("start", OnStart);
updateState = ControlInput("update", OnUpdate);
exitState = ControlInput("exit", OnExit);
startStateFinished = ControlOutput("Start Finished");
isStateFinished = ValueOutput<bool>("IsStateFinished", (flow) => isStateFinishedValue);
onStateUpdate = ControlOutput("On Update");
exitStateFinished = ControlOutput("Exit Finished");
}
protected virtual ControlOutput OnStart(Flow flow)
{
//GET COMPONENT HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
isStateFinishedValue = false;
return startStateFinished;
}