Struct Rid
- Namespace
- Godot
- Assembly
- GodotSharp.dll
The RID type is used to access a low-level resource by its unique ID. RIDs are opaque, which means they do not grant access to the resource by themselves. They are used by the low-level server classes, such as DisplayServer, RenderingServer, TextServer, etc.
A low-level resource may correspond to a high-level Resource, such as Texture or Mesh
public readonly struct Rid : IEquatable<Rid>
- Implements
- Inherited Members
Constructors
Rid(GodotObject)
Constructs a new Rid for the given GodotObjectfrom
.
public Rid(GodotObject from)
Parameters
from
GodotObject
Properties
Id
Returns the ID of the referenced low-level resource.
public ulong Id { get; }
Property Value
- ulong
The ID of the referenced resource.
IsValid
public bool IsValid { get; }
Property Value
- bool
Whether or not the ID is valid.
Methods
Equals(Rid)
Returns true if the RIDs are equal.
public bool Equals(Rid other)
Parameters
other
RidThe other RID.
Returns
- bool
Whether or not the RIDs are equal.
Equals(object)
Returns true if this RID and obj
are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe other object to compare.
Returns
- bool
Whether or not the color and the other object are equal.
GetHashCode()
Serves as the hash function for Rid.
public override int GetHashCode()
Returns
- int
A hash code for this RID.
ToString()
Converts this Rid to a string.
public override string ToString()
Returns
- string
A string representation of this Rid.
Operators
operator ==(Rid, Rid)
public static bool operator ==(Rid left, Rid right)
Parameters
Returns
- bool
Whether or not the RIDs are equal.
operator !=(Rid, Rid)
public static bool operator !=(Rid left, Rid right)
Parameters
Returns
- bool
Whether or not the RIDs are equal.