m add photo |
This is no longer a stub. Style. Updated description, added field descriptions. Added usage description. |
||
Line 3: | Line 3: | ||
|Name=Button Destroy | |Name=Button Destroy | ||
}} | }} | ||
The ButtonDestroy component destroys the Target on interaction. | The '''ButtonDestroy''' component destroys the Target [[IDestroyable|IDestroyable]] on [[Type:IButton|IButton]] interaction, such as a [[Slot|slot]]. | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Target|IDestroyable| | |Target|IDestroyable| The destroyable slot target. | ||
|FindObjectRoot|Bool| | |FindObjectRoot|Bool| When this is interacted, this component will take the target and go up in the hierarchy and look for the first [[Component:ObjectRoot|object root]] slot, then destroys it. | ||
}} | }} | ||
== | == Usage == | ||
This can be used in projects that need things destroyed by a button press. | |||
== Examples == | == Examples == | ||
The ButtonDestroy component can be found in many of the default interfaces | The '''ButtonDestroy''' component can be found in many of the default interfaces such as the [[Scene Inspector]]. | ||
== See Also == | == See Also == | ||
Line 20: | Line 21: | ||
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Destroy]] | [[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Destroy]] | ||
[[Category:Components{{#translation:}}|Button Destroy]] | [[Category:Components{{#translation:}}|Button Destroy]] | ||
Latest revision as of 20:28, 11 September 2024
Component image
The ButtonDestroy component destroys the Target IDestroyable on IButton interaction, such as a slot.
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. |
Target
|
IDestroyable | The destroyable slot target. |
FindObjectRoot
|
Bool | When this is interacted, this component will take the target and go up in the hierarchy and look for the first object root slot, then destroys it. |
Usage
This can be used in projects that need things destroyed by a button press.
Examples
The ButtonDestroy component can be found in many of the default interfaces such as the Scene Inspector.