Hello Guest

Author Topic: Crazy bug - sprites at edge of screen are not rendering  (Read 2285 times)

adamnash_fm

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Crazy bug - sprites at edge of screen are not rendering
« on: August 30, 2017, 10:46:55 pm »
Hi, I'm not even sure this is 2D Toolkit related, but I'm just out of options here and desperate to solve an issue I am having.  And it could be a tk2d thing! 

We're getting a very strange bug where after a long time of play (around 30+ minutes of continuous play), many sprites (but not all) are not rendering at the edges of the screen.
 They start to appear as though they flash into existence.  After watching more carefully, we realized that the game objects do indeed exist, but they are just not being rendered.  The inspectors all look fine and no errors.  As the gameplay continues, the issue gets worse and worse, to the point where you can only see the sprites render in very small areas of the screen.  They appear to flash into existence briefly, but all of their logic and collisions are working normally! 

Further, this is also happening in scene view.  I can see the objects correctly in Scene view even if they aren't rendering in Game view, but the scene view camera has it's own exact-same-problem, where the sprites will not render at the edges of the screen. 

I can't be sure this is what's happening, but it's almost as though the frustum culling is somehow changing over time! 

And weirder, it's not every sprite.  It seems to be the animated sprites only, though we also saw it on one larger non-animated sprite. 
More weirdness: When the player loses, we restart the game by literally doing a fresh load of Scene 0.  Nothing camera related persists, and barely anything does at all.

This is happening in Unity, on Builds for all our supported systems (PC, Mac, and PS4), and on a variety of specs from powerful desktops to old laptops. 

Has anyone ever encountered anything like this?  I'm totally out of ideas here.  Any help at all would be greatly appreciated!! 

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Crazy bug - sprites at edge of screen are not rendering
« Reply #1 on: September 03, 2017, 01:19:54 pm »
I've not seen this before - but first thing to test with is to dynamic batching disabled - just to make sure its not related or caused by that. tk2d just creates and uses unity meshes, i don't see how it could be affecting it in that way. If its broken in the Unity editor, you could run the frame debugger to figure out whats going on in that frame...