Component:UIGrabInstancer: Difference between revisions

From Resonite Wiki
Create page for the new UIGrabInstancer
 
Added warning note.
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The '''UIGrabInstancer''' component allows users to instance items from UI elements
{{Infobox Component
|Image=UIGrabInstancer.png
|Name=UIGrabInstancer
}}
 
The '''UIGrabInstancer''' component allows [[User|users]] to instance items from [[UIX]] elements from a template a user provides.
 
{{Table ComponentFields
|Template|Slot| The slot that gets duplicated and grabbed when the GrabInstancer is grabbed.
|ContainerTemplate|Slot| Helps let you compose the duplicate
|ContainerTemplateInstanceRoot|Slot| Helps let you compose the duplicate
|ActivateRoot|Bool| Whether or not the GrabInstancer should activate the newly duplicated slot.
|EnableGrabbable|Bool| Whether or not the GrabInstancer should activate any Grabbable component on the newly duplicated slot.
|SetInstancePersistent|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Bool|Bool]]>'''|TypeAdv3=true| Persistence of the instance
|ExcludedParts|{{RootFieldType|SyncRefList`1|[[Type:Slot|Slot]]}}| Slots will be skipped while duplicating
}}


== Usage ==
== Usage ==
Useful for making copies of items you referenced, but specifically from the [[UIX]] panels you have.


== Behavior ==
{{Note|The way this component instances the template, will spawn the copied item where the template is. So it is usually recommended to place the template where the instancer is so it is not jarring when attempting to grab a copy of the [[Slot]]. (the other way is to use [[ProtoFlux]] to recenter where the user's hand is to adjust for the distance.)|warning}}


== Examples ==
== Examples ==
Line 11: Line 27:


== Related Components ==
== Related Components ==
* [[Component:GrabInstancer|GrabInstancer]] is similar to this component, but uses the grab feature in [[Resonite]] to make a copy of an item template.
[[Category:Components]]
[[Category:Components]]
[[Category:Components:UIX:Interaction]]
[[Category:Components:UIX:Interaction]]

Latest revision as of 02:29, 29 July 2024

Component image 
UIGrabInstancer component as seen in the Scene Inspector


The UIGrabInstancer component allows users to instance items from UIX elements from a template a user provides.

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
Template Slot The slot that gets duplicated and grabbed when the GrabInstancer is grabbed.
ContainerTemplate Slot Helps let you compose the duplicate
ContainerTemplateInstanceRoot Slot Helps let you compose the duplicate
ActivateRoot Bool Whether or not the GrabInstancer should activate the newly duplicated slot.
EnableGrabbable Bool Whether or not the GrabInstancer should activate any Grabbable component on the newly duplicated slot.
SetInstancePersistent [[Type:Nullable`1<Bool>|Nullable`1<Bool>]] Persistence of the instance
ExcludedParts [[Type:list of Slot|list of Slot]] Slots will be skipped while duplicating

Usage

Useful for making copies of items you referenced, but specifically from the UIX panels you have.

The way this component instances the template, will spawn the copied item where the template is. So it is usually recommended to place the template where the instancer is so it is not jarring when attempting to grab a copy of the Slot. (the other way is to use ProtoFlux to recenter where the user's hand is to adjust for the distance.)

Examples

History

The UIGrabInstancer was added in Beta 2024.4.15.1407.

Related Components

  • GrabInstancer is similar to this component, but uses the grab feature in Resonite to make a copy of an item template.