Author Topic: Replacement atlas is disappearing after scene load  (Read 2423 times)

pahe

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 37
    • View Profile
Replacement atlas is disappearing after scene load
« on: July 23, 2014, 02:44:06 AM »
Hi.

I have currently a strange problem and though I have a workaround already, I'm not sure how to really fix that:

I have a preloading scene and load my UIAtlasses via assetbundles from a webserver. After downloading, I assign the UIAtlasses as the replacement atlasses and also make them DontDestroyOnLoad. This all works fine in the editor, but when I'm testing on mobile, the replacement atlasses aren't shown anymore. I debugged some and see that the atlas is present and loaded, but it is not shown.

Now the workaround is, to have a script referencing all reference atlasses. But as far as I understand, this would also mean, that the loaded UIAtlasses are always loaded into memory, right? This isn't something I want to have on mobile. Has anyone else encountered this problem and knows a better solution for that?


Cheers,
Patrick

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Replacement atlas is disappearing after scene load
« Reply #1 on: July 23, 2014, 07:42:24 PM »
Asset bundles need to be created separately for each platform. Asset bundles created for desktop won't be loadable on mobiles. This is a Unity question rather than an NGUI question btw.

pahe

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 37
    • View Profile
Re: Replacement atlas is disappearing after scene load
« Reply #2 on: July 24, 2014, 08:39:36 AM »
Hey.

I know that I have to create seperate assetbundles for the different platforms and I already do. Though I agree with you, that this question is not only related to NGUI (the question would be when assets from an assetbundle are unloaded), I hope that someone else had a similar problem and maybe has a solution for it.
I'll try to create a test project to show you what I mean, but this may take some time.

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
Re: Replacement atlas is disappearing after scene load
« Reply #3 on: February 08, 2016, 08:32:06 AM »
Have you manged to figure this out?