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

Textures Getting Reset

Discussion in 'General Graphics' started by beanie4now, Oct 19, 2018.

  1. beanie4now

    beanie4now

    Joined:
    Apr 22, 2018
    Posts:
    311
    I have a bunch of textures that I write to with some drawable_texture.Apply();
    All of the updating works fine and they look like this errornum1.PNG
    But after loading out to a different scene then back this happens. Two of them disappear.
    errorpt2.PNG
    Then upon ending the game by clicking the play button they disappear error pt 3.PNG down bottom too.

    I have deleted and recreated some of the images but it seems very finicky, sometimes it will delete them on scene load and sometimes not.

    I can't have the images disappearing the player needs them to complete the game.
     
  2. beanie4now

    beanie4now

    Joined:
    Apr 22, 2018
    Posts:
    311
    I did a lot of further testing, I solved the problem by placing the drawing pads as children of Don'tDestroyOnLoad() and then just setActive = false on every scene except the first. The problem still persists in editor however when switching between scenes. It is very strange however since it only applies to the last two "Spawner" and "Wall" and none of the others. I have recreated the game objects and sprites multiple times to no avail.