Implements: BaseComponentView, IButtonComponentView, IComponentModelConfig
Model: ButtonComponentModel
A normal button used for generic situations.
Text: Text of the button.Icon: Sprite that will appear in the right side of the button.
void Configure(BaseComponentModel newModel): Fills the model and refreshes the button component with this data.Button.ButtonClickedEvent onClick: Event that will be triggered when the button is clicked.void SetText(string newText): Set the button text.void SetIcon(Sprite newIcon): Set the button icon.void SetInteractable(bool isInteractable): Set the button clickable or not.bool IsInteractable(): Indicates if the button is Interactable or not.
- Drag the prefab to your scene.
- Configure the model from the inspector.
- Click on [REFRESH].
