Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to keep an asset loaded during entire application

Discussion in 'Scripting' started by VictorKs, Mar 20, 2019.

  1. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    I have some textures that I use on all scenes how can I ensure that it does not get unloaded and loaded when I change scenes?
     
  2. drcrck

    drcrck

    Joined:
    May 23, 2017
    Posts:
    328
    create an object that references your textures somehow and then DontDestroyOnLoad()
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589