Skip to content

Consolidate Button configuration #6957

@provencher

Description

@provencher

Describe the problem

It is frustrating to configure buttons, as they have so many things to set in child game objects:

  • Icon needs a new material instance, and to be set on the icon GO
  • Text and text color need to be set on the TMP GO
  • Event routing requires setting several scripts linked together
  • Backplate and button dimensions are controlled on independent game objects

Beyond that, styling buttons is tedious and requires a lot of duplication.

Describe the solution you'd like

It would be great to have a scriptable object that controls:

  • Color (font and icon)
  • Scale / Dimensions
  • Text anchors
  • Image anchors

This scriptable object would be akin to a CSS class that determines the style of all buttons using it.

In the button component, there is a single script that lets you easily set the icon and text, without manually playing with the materials and TMP components.

Everything other than the top layer of the button should be hidden and auto generated.
This would massively simplify the scene structure at edit time, and make it easier for users to set up complex UIs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EditorFeature RequestFeature request from the communityUX Controls - ButtonsWon't FixA real bug, but Triage feels that the issue is not impactful enough to spend time on

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions