Hello Guest

Author Topic: 2.4B1: Sprites sometimes not displaying in Editor  (Read 8603 times)

habitoti

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
    • Rombos Homepage
2.4B1: Sprites sometimes not displaying in Editor
« on: January 29, 2014, 07:41:00 am »
Hi,

after having installed 2.4B1, sprites are sometimes simply not displayed in Editor. Only when I run the game, everything is fine again (also then back in editor -- but just for some time. Coming back from Mono, and they are gone again). I just see the big background sprite, which is not atlas based, so it's seems something to be wrong with the atlasses now.
When I move a sprite further down the Z-axis, it shows up as a pink box. In it's regular position (all the same z and just layer sorted) it doesn't show up at all.

Regards, habitoti
Checkout our homepage or visit the Rombos blog.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #1 on: January 29, 2014, 11:55:19 am »
Hmm... could be the sprite data unloader.
Try turning it off - tk2dEditorSpriteDataUnloader, comment out the first line to disable it. Then restart Unity and see if it works any better?

habitoti

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
    • Rombos Homepage
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #2 on: January 29, 2014, 09:17:34 pm »
I activated the Sprite Unloader already explicitly with 2.3, because otherwise I faced daily OOMs in Unity. This got much better when I switched it on (though it did not go away completely). I am really hesitant to switch it off now. Is there no other root cause you can think off that was introduced with 2.4?
« Last Edit: January 29, 2014, 09:21:51 pm by habitoti »
Checkout our homepage or visit the Rombos blog.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #3 on: January 30, 2014, 10:43:19 am »
A brief look through the logs doesn't bring up anything obvious. Most of the changes in 2.4 have been very isolated. Can you reproduce this in a simple project? I'll be happy to investigate if I can repro this.

habitoti

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
    • Rombos Homepage
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #4 on: January 30, 2014, 07:57:19 pm »
The one thing that apparently has changed compared to 2.3: I am seeing tons of logs "tk2dEditorSpriteDataUnloader.Register: Already in list" -- I never saw those before.
I'll try to commit all atlasses again -- maybe something changes then.
Checkout our homepage or visit the Rombos blog.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #5 on: January 30, 2014, 10:39:58 pm »
I just checked the log. There have been 2 changes to that file, one enabling the #define, and the other commenting a line out getting rid of a warning. Have you restarted Unity since this?

habitoti

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
    • Rombos Homepage
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #6 on: January 31, 2014, 05:24:13 am »
I sure did -- had 2 OOMs since  ;)

Since the sprites immediately re-appear as soon as I press Run, this is not a major showstopper for me. I'll keep watchin whether I see anything that can give you more clues as of what is happening...
Checkout our homepage or visit the Rombos blog.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #7 on: January 31, 2014, 11:24:28 am »
Ok. Please keep me posted I'd like to get to the bottom of this if possible.

habitoti

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
    • Rombos Homepage
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #8 on: February 01, 2014, 11:41:33 am »
I made a small video for you to demonstrate the issue, so that you have at least a better clue what symptoms I am describing here.
It happens seemingly when Unity decides to compile everything, not just the deltas from my current changes (not sure at what point it decides so, because I usually just change my stuff, and delta should always do...). You can spot that when all the warnings from the bit outdated SmartLocalization package (just deprecation, uncritical) show up in the console...
In the end you see that after running the scene everything is fine again. In the beginning I move the invisible sprites z-wise to -1, and then they show up as pink blobs only.

Regards, habitoti 
« Last Edit: February 01, 2014, 11:45:37 am by habitoti »
Checkout our homepage or visit the Rombos blog.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #9 on: February 01, 2014, 02:05:18 pm »
Is this reproducible in a smaller project? If yes, this will make things so much easier to track down and fix...

habitoti

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
    • Rombos Homepage
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #10 on: February 01, 2014, 02:11:58 pm »
No, tried that already. But then, I don't have the time to really play around enough with the stripped down stuff to wait until it might occur. It's really not good reproducible at all, but happens pretty regularly while I am working. I understand that it's very unsatisfying for you as the programmer (had been in such situations as well) and would love to give you more data. Maybe you can provide a build with some additional logs or assertions around atlas access?
Checkout our homepage or visit the Rombos blog.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #11 on: February 01, 2014, 02:23:23 pm »
I'll look into this. The puzzling thing is why its happening in 2.4 and not 2.3 - they are almost identical and none of the relevant code has changed.

David Kalina

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #12 on: February 12, 2014, 04:12:23 pm »
I'm seeing something almost identical to this with sprites from my very first PNG Atlas in tk2d 2.3.3 (with the latest sprite unloader code that you emailed me the other day).  Suddenly all the sprites from that particular atlas go pink in the editor.  If I press play, the pinkness goes away (and stays away when I return to edit mode).

I'm trying with the sprite unloader disabled today, will report back later.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2.4B1: Sprites sometimes not displaying in Editor
« Reply #13 on: February 12, 2014, 04:22:11 pm »
Please move the discussion to this thread - there is a potential fix posted there.
http://2dtoolkit.com/forum/index.php/topic,3627.0.html