Search Unity

Android plugins - texture memory weirdness

Discussion in 'Android' started by UVRadiation, Jul 6, 2011.

  1. UVRadiation

    UVRadiation

    Joined:
    Jul 21, 2008
    Posts:
    183
    Hi People,
    Maybe someone can help me solve this problem I am having with using Android plugins,

    I am calling a function on a plugin that displays it's own screen ,specifically the TapJoy plugin but I don't think it's related to a specific plugin, now when I press the back button and regain focus to my Unity app, sometimes some of the textures are missing, (f.e a Texture I use on a GUI and loaded in realtime from the resources folder).
    If I then minimize the app and open it up again all the textures are loaded again .

    The way I understand it, when there isn't enough memory, the Android starts deleting textures from the memory of a background activity and when the Unity app regains focus the memory is changed.

    my question is how do I stop this from happening? or how do I know if a specific texture is no longer in the memory and load it again?

    Thanks!
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The only thing I could think of helping here is marking them as dontdestroy if you didn't already do that
     
  3. UVRadiation

    UVRadiation

    Joined:
    Jul 21, 2008
    Posts:
    183
    Thanks dreamora, I can't seem to reproduce the bug now.. the worst kind of bugs, I didn't mark it as dontdestroy, I'll try to do that if I can find a way to reproduce the error.
    I didn't think it affects the actual way it's loaded and sustained on the device, but it's worth a shot :)
    Thanks for you help!