Class AInUnityStepSensor
Use this class to create sensors that have to execute code in a Unity execution steps (Update, FixedUpdate, LateUpdate, ...) You need to call the base constructor when inheriting this class and implement the Init (optional) and UnityStepSensorCheck (mandatory) methods
Inherited Members
Namespace: Xareus.Scenarios.Unity
Assembly: Xareus.Scenarios.Unity.dll
Syntax
public abstract class AInUnityStepSensor : AUnitySensor
Constructors
AInUnityStepSensor(Event, Dictionary<string, Parameter>, IContext, IContext, IContext)
Declaration
protected AInUnityStepSensor(Event @event, Dictionary<string, Parameter> parameters, IContext externalContext, IContext scenarioContext, IContext sequenceContext)
Parameters
Type | Name | Description |
---|---|---|
Event | event | |
Dictionary<string, Parameter> | parameters | |
IContext | externalContext | |
IContext | scenarioContext | |
IContext | sequenceContext |
Properties
ExecutionSteps
Declaration
[AdvancedConfigurationParameter("Execution Steps", UnityThreadExecute.UnityExecutionStep.Update, "Set the unity execution steps at which this sensor must run", Necessity.Optional)]
public UnityThreadExecute.UnityExecutionStep ExecutionSteps { get; set; }
Property Value
Type | Description |
---|---|
UnityThreadExecute.UnityExecutionStep |
Methods
InternalUpdate()
This method is called at each Unity Update (each frame) in Unity's thread.
Declaration
protected void InternalUpdate()
PostCheck()
The event was checked. The internal update can now update next time it executes
Declaration
public override void PostCheck()
Overrides
Reset()
Declaration
public override void Reset()
Overrides
SafeSensorCheck()
This method is called at each scenario update. Note that this code will be executed in unity's thread
Declaration
public override sealed ASensor.Result SafeSensorCheck()
Returns
Type | Description |
---|---|
ASensor.Result |
Overrides
StopCheck()
Declaration
public override void StopCheck()
Overrides
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 abstract ASensor.Result UnityStepSensorCheck()
Returns
Type | Description |
---|---|
ASensor.Result |