Struct ObjectId
A unique identifier assigned to each trait-based object within a state
Namespace: Unity.AI.Planner.Traits
Syntax
public struct ObjectId : IEquatable<ObjectId>
Fields
None
The reserved ObjectId value specifying a reference to no trait-based object
Declaration
public static readonly ObjectId None
Field Value
Type | Description |
---|---|
ObjectId |
Value
Id Value
Declaration
public int Value
Field Value
Type | Description |
---|---|
Int32 |
Methods
Equals(Object)
Test for equality
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Other ObjectId |
Returns
Type | Description |
---|---|
Boolean | Result of equality test |
Overrides
Equals(ObjectId)
Compares an ObjectId to another ObjectId
Declaration
public bool Equals(ObjectId other)
Parameters
Type | Name | Description |
---|---|---|
ObjectId | other | ObjectId for comparison |
Returns
Type | Description |
---|---|
Boolean | Returns true if the ObjectIds are equal |
GetHashCode()
Get the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Hash code |
Overrides
GetNext()
Provides a new trait-based object with an unassigned Id
Declaration
public static ObjectId GetNext()
Returns
Type | Description |
---|---|
ObjectId | Returns a new, unassigned Id |
ToString()
Returns a string that represents the ObjectId
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that represents the ObjectId |
Overrides
Operators
Equality(ObjectId, ObjectId)
Compares two given ObjectIds
Declaration
public static bool operator ==(ObjectId x, ObjectId y)
Parameters
Type | Name | Description |
---|---|---|
ObjectId | x | An ObjectId |
ObjectId | y | An ObjectId |
Returns
Type | Description |
---|---|
Boolean | Returns if two TraitBasedObjectIds are equal |
Inequality(ObjectId, ObjectId)
Compares two given ObjectIds
Declaration
public static bool operator !=(ObjectId x, ObjectId y)
Parameters
Type | Name | Description |
---|---|---|
ObjectId | x | An ObjectId |
ObjectId | y | An ObjectId |
Returns
Type | Description |
---|---|
Boolean | Returns if two TraitBasedObjectIds are not equal |