Implements: BaseComponentView, IToggleComponentView, IComponentModelConfig
Model: ToggleComponentModel
A checkbox toggle used for items selections.
Id: Unique identifier for the checkbox.Text: Text that will be showed in the checkbox.IsOn: Indicates if the checkbox is selected or not.isTextActive: Boolean that sets the text active or not.
void Configure(BaseComponentModel newModel): Fills the model and refreshes the toggle component with this data.event Action<bool, string> OnSelectedChanged: Event that will be triggered when the toggle changes.string Id: Id asociated to the toogle.bool IsOn: On/Off state of the toggle.string Title: Text (if exists) associated to the toggle.void SetText(string newText): Set the toggle text.void SetTextActive(bool isActive): Set toggle text active.void SetInteractable(bool isInteractable): Set the toggle clickable or not.bool IsInteractable(): Return if the toggle is Interactable or not.void SetIsOnWithoutNotify(bool isOn): Set the state of the toggle as On/Off without notify event.
- Drag the prefab to your scene.
- Configure the model from the inspector.
- Click on [REFRESH].
