Struct MarkerRef
A name for one marker that works for both tiers: bulk GPU instances and prefab GameObjects. It is not a base class and not a store.
public readonly struct MarkerRef : IEquatable<MarkerRef>
- Implements
Remarks
Bulk Handle values are MarkerStore ids.
Prefab handles come from WorldMarkerManager
(TabletopContentView.Spawn forwards there).
The same integer in two tiers is two different markers; compare the
whole ref, never the handle alone.
Properties
Handle
Per-tier id. Negative means None. Do not pass a prefab handle to MarkerStore or a bulk handle to WorldMarkerManager.
public int Handle { get; }
Property Value
IsNone
True when this does not name a marker.
public bool IsNone { get; }
Property Value
None
No marker. Handle is negative.
default(MarkerRef) is not this: it is bulk handle 0, a live
first-slot id. Use this property, not default.
public static MarkerRef None { get; }
Property Value
Tier
Which store this handle is from.
public MarkerTier Tier { get; }
Property Value
Methods
Bulk(int)
Names a bulk-tier marker. A negative handle
becomes None.
public static MarkerRef Bulk(int handle)
Parameters
handleint
Returns
Equals(MarkerRef)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(MarkerRef other)
Parameters
otherMarkerRefAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Prefab(int)
Names a GameObject marker from WorldMarkerManager
(TabletopContentView.Spawn forwards there). A negative
handle becomes None.
public static MarkerRef Prefab(int handle)
Parameters
handleint
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
WorldBulk(int)
Names a floating tabletop bulk marker whose store is not
Map.Markers. A negative handle becomes
None. Shared-store tables keep Bulk(int).
public static MarkerRef WorldBulk(int handle)
Parameters
handleint
Returns
Operators
operator ==(MarkerRef, MarkerRef)
public static bool operator ==(MarkerRef a, MarkerRef b)
Parameters
Returns
operator !=(MarkerRef, MarkerRef)
public static bool operator !=(MarkerRef a, MarkerRef b)