Struct TrackableCollection<TTrackable>
A collection for ARTrackable<TSessionforeach
statement.
Implements
Inherited Members
Namespace: UnityEngine .XR.ARFoundation
Assembly: Unity.XR.ARFoundation.dll
Syntax
public struct TrackableCollection<TTrackable> : IEquatable<TrackableCollection<TTrackable>>
Type Parameters
Name | Description |
---|---|
TTrackable | The concrete ARTrackable<TSession |
Constructors
TrackableCollection(Dictionary<TrackableId, TTrackable>)
Constructs a Trackable
Declaration
public TrackableCollection(Dictionary<TrackableId, TTrackable> trackables)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<Trackable |
trackables | A |
Properties
this[TrackableId]
Retrieves a TTrackable
s by TrackableId
.
Declaration
public TTrackable this[TrackableId trackableId] { get; }
Parameters
Type | Name | Description |
---|---|---|
Trackable |
trackableId | The trackable id associated with the trackable to retrieve. |
Property Value
Type | Description |
---|---|
TTrackable | The |
count
Returns the number of trackables in this collection.
Declaration
public int count { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Equals(object)
Checks the equality of this object against this Trackable
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object that this collection should be checked against for equivalency. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Equals(TrackableCollection<TTrackable>)
Checks the equality of this TrackableTTrackable
generic type.
Declaration
public bool Equals(TrackableCollection<TTrackable> other)
Parameters
Type | Name | Description |
---|---|---|
Trackable |
other | The Trackable |
Returns
Type | Description |
---|---|
bool |
|
GetEnumerator()
Creates an Enumerator
for this collection.
Declaration
public TrackableCollection<TTrackable>.Enumerator GetEnumerator()
Returns
Type | Description |
---|---|
Trackable |
An |
GetHashCode()
Retrieves the hashcode of the Trackable
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The hashcode of if the Trackable |
Overrides
TryGetTrackable(TrackableId, out TTrackable)
Attempts to retrieve a trackable by TrackableId
.
Declaration
public bool TryGetTrackable(TrackableId trackableId, out TTrackable trackable)
Parameters
Type | Name | Description |
---|---|---|
Trackable |
trackableId | The trackable id associated with the trackable to retrieve. |
TTrackable | trackable | Set to the trackable with |
Returns
Type | Description |
---|---|
bool |
|
Operators
operator ==(TrackableCollection<TTrackable>, TrackableCollection<TTrackable>)
Overloads the ==
operator to use the equals method for equality checking.
Declaration
public static bool operator ==(TrackableCollection<TTrackable> lhs, TrackableCollection<TTrackable> rhs)
Parameters
Type | Name | Description |
---|---|---|
Trackable |
lhs | The Trackable |
Trackable |
rhs | The Trackable |
Returns
Type | Description |
---|---|
bool |
|
See Also
operator !=(TrackableCollection<TTrackable>, TrackableCollection<TTrackable>)
Overloads the !=
operator to use the equals method for equality checking.
Declaration
public static bool operator !=(TrackableCollection<TTrackable> lhs, TrackableCollection<TTrackable> rhs)
Parameters
Type | Name | Description |
---|---|---|
Trackable |
lhs | The Trackable |
Trackable |
rhs | The Trackable |
Returns
Type | Description |
---|---|
bool |
|