Type:IWorldElement: Difference between revisions

From Resonite Wiki
Added more info on IWorldElement including a heed of warning, also types to type
m chore: category caps
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Stub}}
The '''IWorldElement''' type is an [[interface type]] that represents any object of a [[reference type]] that may exist in a world.
IWorldElement is a reference to anything that may exist in a world. this can be a value field, component, user, reference, or anything contained in a world.  


(TODO: Is this correct?)
Every object that can be referenced can be casted to and from IWorldElement, making the type a universal interface to everything in a world.


The only exception to this type is references above root, which can only be accessed through commonly unsupported/frowned upon methods such as Reference Hacking Aka RefHacking. Types that don't fall under IWorldElement can be dangerous to mess with if you don't know what they do. If you're not the host, you can even get security kicked, booting you from the world due to the game thinking you are trying to tamper with the session's permissions.
Objects that are IWorldElements include, but are not limited to:
 
* [[Slots]]
* [[Components]]
* [[Users]]
* [[Type:SyncElement|Sync Elements]], such as [[Type:IField|fields]] on an object
* [[Type:SyncObject|Sync Objects]], such as <code>Point</code>s on a [[Component:ValueGradientDriver|ValueGradientDriver]]
 
Every IWorldElement has a unique [[Type:RefID|reference ID]] associated with it. Only one IWorldElement in a world may have any given reference ID, including elements that exist outside of the [[Root]] hierarchy.


See also: [[Things to Avoid]]
[[Category:Type]]
[[Category:Type]]
[[Category:Reference types]]

Latest revision as of 03:46, 10 June 2025

The IWorldElement type is an interface type that represents any object of a reference type that may exist in a world.

Every object that can be referenced can be casted to and from IWorldElement, making the type a universal interface to everything in a world.

Objects that are IWorldElements include, but are not limited to:

Every IWorldElement has a unique reference ID associated with it. Only one IWorldElement in a world may have any given reference ID, including elements that exist outside of the Root hierarchy.