Some isometric objects render as a black square on Chrome
prajwal.be.21

Hey,

So I have run into a problem again on small screen devices. Some of the isometric objects render as a black procedural sqaure game objects and do not render the sprite image of the game object. This happens only on chrome for mobiles. In Firefox there aren't any issues. I'm sharing so that you can check out what's wrong on Chrome. Only few isometric objects become black. The temple looks fine but not the trees.


Can someone tell me what could be causing this issue on Chrome for mobile?

All 2 Comments
Gio

It's difficult to answer your question without knowing more about your project, but my first guess would be some sort of timing issue. Like trying to render or create the webgl textures before the source images are ready, or something along those lines.

A couple of questions and things you could check:

1. How are you loading those images that result in black sprites?

2. On a desktop PC in the console, do you get any warning messages such as "Attempting to use image xxx before loading it

3. Are you using WebGL? If so, in the Settings tab of your Scene Properties, do you have Preload Textures selected?

 

prajwal.be.21

Hey Gio, thanks for pointing the right direction and I did figure out it was due to bad setup of layers in WebGL (I had not checked preload textures). I had laoded the images in the editor but forgot to set preload textures to true. Will keep this in mind next time. For this issue, I didn't need WebGL for that layer so I just switched back to 2D and it works fine now. Thanks Gio!

Post a reply
Add Attachment
Submit Reply
Login to Reply