|
|
@ -28,7 +28,7 @@ public unsafe class IdentifierRef |
|
|
|
public (EntityRef Relation, EntityRef Target)? AsPair() |
|
|
|
public (EntityRef Relation, EntityRef Target)? AsPair() |
|
|
|
=> IsPair ? (Universe.LookupOrThrow(ID.RelationUnsafe), Universe.LookupOrThrow(ID.TargetUnsafe)) : null; |
|
|
|
=> IsPair ? (Universe.LookupOrThrow(ID.RelationUnsafe), Universe.LookupOrThrow(ID.TargetUnsafe)) : null; |
|
|
|
|
|
|
|
|
|
|
|
public bool Equals(IdentifierRef? other) => (other is not null) && Universe == other.Universe && ID == other.ID; |
|
|
|
public bool Equals(IdentifierRef? other) => (other is not null) && (Universe == other.Universe) && (ID == other.ID); |
|
|
|
public override bool Equals(object? obj) => Equals(obj as IdentifierRef); |
|
|
|
public override bool Equals(object? obj) => Equals(obj as IdentifierRef); |
|
|
|
public override int GetHashCode() => HashCode.Combine(Universe, ID); |
|
|
|
public override int GetHashCode() => HashCode.Combine(Universe, ID); |
|
|
|
public override string? ToString() => ecs_id_str(Universe, this).FlecsToStringAndFree()!; |
|
|
|
public override string? ToString() => ecs_id_str(Universe, this).FlecsToStringAndFree()!; |
|
|
|