Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to force resolve styles immediately

Discussion in 'UI Toolkit' started by Afropenguinn, Jun 7, 2022.

  1. Afropenguinn

    Afropenguinn

    Joined:
    May 15, 2013
    Posts:
    305
    So say you have something like a tooltip. When you hover over something several things need to happen in one frame:
    • All its data gets filled in: Icons, descriptions, ect. This changes the width or height of the element, naturally.
    • The tooltip is placed somewhere, taking into account its resolved width and height.
    The problem is that the width and height are not resolved in between those two steps, so for around 1 frame the tooltip will be in the wrong place. Is there a way to force styles to resolve?
     
  2. TomTheMan59

    TomTheMan59

    Joined:
    Mar 8, 2021
    Posts:
    302
    Not at this time.
     
  3. Afropenguinn

    Afropenguinn

    Joined:
    May 15, 2013
    Posts:
    305
    Any current workarounds?
     
  4. TomTheMan59

    TomTheMan59

    Joined:
    Mar 8, 2021
    Posts:
    302
    I don’t think so :(