Type:IWorldElement: Difference between revisions

From Resonite Wiki
m chore: category caps
add fields
 
Line 1: Line 1:
The '''IWorldElement''' type is an [[interface type]] that represents any object of a [[reference type]] that may exist in a world.
The '''IWorldElement''' type is an [[interface type]] that represents any object of a [[reference type]] that may exist in a world. It is the foundation of the [[data model]].


Every object that can be referenced can be casted to and from IWorldElement, making the type a universal interface to everything in a world.
Every object that can be referenced can be cast 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:
Objects that are IWorldElements include, but are not limited to:
Line 12: Line 12:


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.
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.
== Fields ==
{{Table TypeFields
|ReferenceID|RefID|Reference ID of the element.
|Name|string|Name of the element.
|World|World|World that the element exists in.
|Parent|IWorldElement|Potential parent element. Can be null.
|IsLocalElement|bool|Whether the element exists only for the local user and nobody else.
|IsPersistent|bool|Whether the element is marked as persistent, meaning it will get saved when a save event occurs on it or its parents.
|IsRemoved|bool|Whether the element is removed from the world.
}}


[[Category:Type]]
[[Category:Type]]
[[Category:Reference types]]
[[Category:Reference types]]

Latest revision as of 18:14, 30 June 2025

The IWorldElement type is an interface type that represents any object of a reference type that may exist in a world. It is the foundation of the data model.

Every object that can be referenced can be cast 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.

Fields

Fields
Name Type Description
ReferenceID RefID Reference ID of the element.
Name string Name of the element.
World World World that the element exists in.
Parent IWorldElement Potential parent element. Can be null.
IsLocalElement bool Whether the element exists only for the local user and nobody else.
IsPersistent bool Whether the element is marked as persistent, meaning it will get saved when a save event occurs on it or its parents.
IsRemoved bool Whether the element is removed from the world.