989onan bot (talk | contribs) Automated: update SyncDelegates |
add info |
||
Line 21: | Line 21: | ||
== Sync Delegates == | == Sync Delegates == | ||
{{Table ComponentTriggers | {{Table ComponentTriggers | ||
|SetupForChildrenObjects:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| | |SetupForChildrenObjects:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Tells the boolean switcher to add all the children slot active fields of it's slot to it's list. | ||
}} | }} | ||
Latest revision as of 22:36, 18 March 2025
Component image 
Boolean Switcher component as seen in the Scene Inspector

The BooleanSwitcher component can be used to enable and disable a list of Slots depending on an index in the list. It does so by driving the Active field of the slots.
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. Some components stop their functionality when this field is disabled, but some don't. |
AutoAddChildren
|
Bool | If true, the Targets list will be automatically populated with the child slots of the slot that this component is on. |
AutoAddIgnoreTags
|
direct SyncFieldList`1<String> | Don't auto add a child slot to the list if it has a tag that is in this list. |
Targets
|
list of FieldDrive`1<Bool> | The list of slots of which one will be enabled. |
ActiveIndex
|
Int | The index of the currently active slot. |
ActivationMode
|
BooleanSwitcher.Mode | Allows for enabling items in Target based on ActiveIndex number.
|
Sync Delegates
Method Name | Method type and Arguments. | Is the method hidden? | Description |
---|---|---|---|
SetupForChildrenObjects:ButtonEventHandler
|
ButtonEventHandler | ✓ | Tells the boolean switcher to add all the children slot active fields of it's slot to it's list. |
Mode
Name | Value | Description |
---|---|---|
AtIndexOnly
|
0 | Activates only item at ActiveIndex .
|
AllButIndex
|
1 | Activates all items except the one at ActiveIndex which will be disabled.
|
IndexAndBefore
|
2 | Activates all items that are before and at ActiveIndex .
|
IndexAndAfter
|
3 | Activates all items at and after ActiveIndex
|
Usage
Examples
- BooleanSwitcher tutorial by ProbablePrime. May be out of date.