Type:User: Difference between revisions

From Resonite Wiki
add some more info
reword
 
Line 1: Line 1:
A reference to a User connected to the session. Not to be confused with the physical form [[User]].
The '''User''' type is a [[reference type]] underlying the concept of a [[user]]. This type stores all the fields and components interactable in the [[user inspector]], for example.
 
This type is a direct reference to a user in a session and is non-persistent. If a user leaves and rejoins the session, fields of this type will be nulled out. For a more permanent reference to a user that persists across rejoins, the [[Type:UserRef|UserRef]] type is more suitable.


When wanting to get a user, this is only a temporary type.
For more permanent things, Instead consider using a [[Type:UserRef|UserRef]] since a UserRef will re-grab the User object when the targeted user leaves  and rejoins the session.
[[Category:Type]]
[[Category:Type]]
[[Category:Reference types]]

Latest revision as of 03:44, 10 June 2025

The User type is a reference type underlying the concept of a user. This type stores all the fields and components interactable in the user inspector, for example.

This type is a direct reference to a user in a session and is non-persistent. If a user leaves and rejoins the session, fields of this type will be nulled out. For a more permanent reference to a user that persists across rejoins, the UserRef type is more suitable.