protected override Dictionary <string, object> CompiledNodeEval(Dictionary <string, object> inputstate, Dictionary <string, object> intermediateOutVals) { var output = intermediateOutVals; //when this node is being executed the caller must have been passed, so we can search the graph //this node belongs to and find the caller in the execution input... var inputTriggerNode = GraphOwner.Nodes.OfType <InputExecutionNode>().First(); caller = inputTriggerNode.CustomNodeWrapperCaller; //when this node is executed we need to grab the correct values off the calling wrapper node //and then pass them as outputs if (caller == null) { Debug.LogException(new Exception("the caller has not been set, so this input symbol doesn't know what node to search for input values")); } //TODO dont know if this is correct using nickname output ["variable_value"] = caller.StoredValueDict [InputSymbol]; (inputstate ["done"] as Delegate).DynamicInvoke(); return(output); }
protected override Dictionary <string, object> CompiledNodeEval(Dictionary <string, object> inputstate, Dictionary <string, object> intermediateOutVals) { var output = intermediateOutVals; //when this node is being executed the caller must have been passed, so we can search the graph //this node belongs to and find the caller in the execution input... var inputTriggerNode = GraphOwner.Nodes.OfType <InputExecutionNode>().First(); caller = inputTriggerNode.CustomNodeWrapperCaller; //when this node is executed we need to push the input value to the stored value dict on the //calling node if (caller == null) { Debug.LogException(new Exception("the caller has not been set, " + "so this input symbol doesn't know what node to search for input values")); } caller.StoredValueDict[Symbol] = output ["output_value"]; (inputstate ["done"] as Delegate).DynamicInvoke(); return(output); }