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

Feature Request Generate USS files from IStyle or cache and set styles

Discussion in 'UI Toolkit' started by Nexer8, Jan 3, 2021.

  1. Nexer8

    Nexer8

    Joined:
    Dec 10, 2017
    Posts:
    271
    Since there is no way to cache VisualElements as they are destroyed in domain reload, I think it would be useful to be able to create USS files or temporary USS ScriptableObjects that can be saved and applied to a style. An even better alternative would be to have the option to cache styles so that they can be easily applied to VisualElements (at the moment you can only get and not set a style).
     
  2. Orimay

    Orimay

    Joined:
    Nov 16, 2012
    Posts:
    304
    Perhaps, runtime uss classes could help. I with they were present