Class VisualScriptingSensor
Inheritance
VisualScriptingSensor
Assembly: Xareus.Scenarios.Unity.VisualScripting.Sensors.dll
Syntax
public class VisualScriptingSensor : AInUnityStepSensor
Constructors
VisualScriptingSensor(Event, Dictionary<string, Parameter>, ContextHolder)
Declaration
public VisualScriptingSensor(Event @event, Dictionary<string, Parameter> parameters, ContextHolder contexts)
Parameters
Fields
GRAPH_PARAM
Declaration
public const string GRAPH_PARAM = "Flow Graph"
Field Value
SENSOR_VARIABLE_DEFAULT_NAME
Declaration
public const string SENSOR_VARIABLE_DEFAULT_NAME = "Sensor"
Field Value
SENSOR_VARIABLE_NAME_PARAM
Declaration
public const string SENSOR_VARIABLE_NAME_PARAM = "Sensor Variable Name"
Field Value
graphAsset
Declaration
[ConfigurationParameter("Flow Graph", "The graph that the sensor will use", Necessity.Required)]
public ScriptGraphAsset graphAsset
Field Value
| Type |
Description |
| ScriptGraphAsset |
|
sensorVariable
Declaration
[ConfigurationParameter("Sensor Variable Name", "Sensor", "The name of the graph variable that will contain this sensor instance.\nWhen instantiating the graph, the sensor will set the graph variable value to itself (this) so that it can be used in the graph as a parameter of the SensorResult node", Necessity.Required)]
public string sensorVariable
Field Value
Methods
SafeReset()
Reset a sensor. Note that this code will be executed in unity's thread and the declared parameters (using the ConfigurationParameter attribute) are already filled
Declaration
public override void SafeReset()
Overrides
SafeStopCheck()
Stops a sensor. Note that this code will be executed in unity's thread and the declared parameters (using the ConfigurationParameter attribute) are already filled
This will be called when the transition contining this sensor is no longer ready to be triggered.
Either it already fired or tokens moved and the transition no longer has the necessary upstream tokens
Declaration
public override void SafeStopCheck()
Overrides
SetGraphVariables(FlowGraph)
Declaration
protected virtual void SetGraphVariables(FlowGraph graph)
Parameters
| Type |
Name |
Description |
| FlowGraph |
graph |
|
SetResult(bool)
Declaration
public void SetResult(bool result)
Parameters
| Type |
Name |
Description |
| bool |
result |
|
UnityStepSensorCheck()
This method is called at each selected Unity execution step in Unity's thread. The Unity execution steps used depend on the ExecutionStep property
Declaration
public override ASensor.Result UnityStepSensorCheck()
Returns
Overrides