Search Unity

Radial filling

Discussion in 'UI Toolkit' started by OMGOMGXAXA, Jul 12, 2021.

  1. OMGOMGXAXA

    OMGOMGXAXA

    Joined:
    Apr 2, 2016
    Posts:
    10
    I need radial filling for my game. In order to have a button with time completion. Is it possible to achieve it with UI Builder ?

    For example, a button like this one :
    upload_2021-7-12_10-46-34.png
     

    Attached Files:

  2. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    377
    We don't have any styling that allows to create radial visuals like this. You could create a VisualElement that generates a custom mesh to display the border. See VisualElement.GenerateVisualContent.

    On 2022.1 we're working on a vector API that could create an actual mesh border, but in the meantime a texture could work.
     
    Last edited: Jul 12, 2021
    OMGOMGXAXA likes this.