Search Unity

Requesting sprite atlas load when changing resolution (or other custom events)

Discussion in '2D' started by tspk91, May 18, 2019.

  1. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    131
    I'm trying to get the .atlasRequested delegate of the sprite atlas manager to be called when resolution is changed. We have our base sprite atlas in 4k, and then atlas variants for 900p, 1080p. Currently we can load dynamically the correct one only the first time sprites are shown.

    What I need is a way of getting that request to happen when resolution is changed. It would be useful too to load atlases when changing UI size (a tiny UI in a 4k screen maybe uses the 900p sprites).

    Thanks! This is with unity 2018.3 by the way.