Type:RefID: Difference between revisions

From Resonite Wiki
Small correction.
cleanup
Line 1: Line 1:
RefID is a wrapper type around a [[Type:ULong|ulong]] value which represents a pointer to a [[Type:IWorldElement|world element]].
The '''RefID''' type is a wrapper around a [[Type:ULong|ulong]] value which represents a pointer to a [[Type:IWorldElement|world element]]. Every IWorldElement stores a unique RefID as its <code>ReferenceID</code> field. It is primarily an internal engine type and is not meant to be used directly.


It uses its final byte to represent the allocation id of a user who allocated the world element, and the remaining bytes are used to represent which world element it's pointing to.
RefIDs use their final byte to represent the allocation id of a user who allocated the world element, and the remaining bytes are used to represent which world element it's pointing to.


It is primarily an internal engine type and is not meant to be used directly.
[[Category:Value Types]]
 
Many users eventually found that it is useful for [[Ref Hacking]], as this type is a reference to different parts of the engine ([[Slot|Slots]], [[Component|Components]], etc)

Revision as of 23:04, 7 December 2024

The RefID type is a wrapper around a ulong value which represents a pointer to a world element. Every IWorldElement stores a unique RefID as its ReferenceID field. It is primarily an internal engine type and is not meant to be used directly.

RefIDs use their final byte to represent the allocation id of a user who allocated the world element, and the remaining bytes are used to represent which world element it's pointing to.