Class HasComponentOfTypeSensor
Inheritance
HasComponentOfTypeSensor
Assembly: Xareus.Unity.Librairies.dll
Syntax
[FunctionDescription("Check if a game object (or one of its children) has a component of a specific type")]
public class HasComponentOfTypeSensor : AUnitySensor
Constructors
HasComponentOfTypeSensor(Event, Dictionary<string, Parameter>, IContext, IContext, IContext)
Declaration
public HasComponentOfTypeSensor(Event @event, Dictionary<string, Parameter> parameters, IContext externalContext, IContext scenarioContext, IContext sequenceContext)
Parameters
Fields
COMPONENT
Event context entry for the first or only component found
Declaration
[EventContextEntry]
protected static string COMPONENT
Field Value
COMPONENTS
Event context entry for all components found
Declaration
[EventContextEntry]
protected static string COMPONENTS
Field Value
componentType
Declaration
[ConfigurationParameter("Component Type", Necessity.Required)]
[ProvideConstraint(typeof(Component))]
protected Type componentType
Field Value
eventContext
Declaration
protected SimpleDictionary eventContext
Field Value
gameObject
Declaration
[ConfigurationParameter("Game Object", Necessity.Required)]
protected GameObject gameObject
Field Value
Type |
Description |
GameObject |
|
includeChildren
Declaration
[ConfigurationParameter("Include Children", false, Necessity.Optional)]
[ProvideConstraint(typeof(Component))]
protected bool includeChildren
Field Value
Methods
SafeSensorCheck()
This method is called at each scenario update. Note that this code will be executed in unity's thread
Declaration
public override ASensor.Result SafeSensorCheck()
Returns
Overrides