Struct ActionContext
Planner context for an action that is provided to an operational action (e.g. IOperationalAction)
Namespace: Unity.AI.Planner
Syntax
public struct ActionContext : IEquatable<ActionContext>
Fields
ActionEntity
The entity for the planner action node in the policy graph
Declaration
public Entity ActionEntity
Field Value
Type | Description |
---|---|
Entity |
StateEntity
The entity for the state in which the action is performed
Declaration
public Entity StateEntity
Field Value
Type | Description |
---|---|
Entity |
Properties
Name
The name of the planner action system that corresponds to this operational action
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Equals(ActionContext)
Declaration
public bool Equals(ActionContext other)
Parameters
Type | Name | Description |
---|---|---|
ActionContext | other |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
GetTrait<T>(Int32)
Return the trait for a specific argument (i.e. Entity) that was specified with the action
Declaration
public T GetTrait<T>(int argumentIndex)
where T : struct, IComponentData
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | argumentIndex | Index of the argument (corresponds with the parameter index in the Plan Definition) |
Returns
Type | Description |
---|---|
T | The specified trait data |
Type Parameters
Name | Description |
---|---|
T | Trait type |
Operators
Equality(ActionContext, ActionContext)
Returns true if two ActionContexts are equal and false otherwise
Declaration
public static bool operator ==(ActionContext x, ActionContext y)
Parameters
Type | Name | Description |
---|---|---|
ActionContext | x | An ActionContext to compare. |
ActionContext | y | An ActionContext to compare. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if two ActionContexts are equal. |
Inequality(ActionContext, ActionContext)
Returns true if two ActionContexts are not equal and false otherwise
Declaration
public static bool operator !=(ActionContext x, ActionContext y)
Parameters
Type | Name | Description |
---|---|---|
ActionContext | x | An ActionContext to compare. |
ActionContext | y | An ActionContext to compare. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if two ActionContexts are not equal. |