Hey! I have a weird bug - game objects of some type (somefile.go) are just invisible in game.
editor:
game:
Purple ones are just sprites. Green ones are .go instances (just sprite). Materials are the same. Blend modes also same.
It’s not z-order problem. Tried rebuild. Tried close Defold - open again. Didn’t help.
Have no clue what’s this.
Workaround: just recreate that .go file and use it.
Reproduce: just take a look at my ‘test2’ project. ‘bug with gem.go invisibility’
As I said it’s not z-order problem, since world’s z is in [-1, 1] and there is no overlap for some of the sprites.
I don’t know projection matrix of renderer, will check today’s evening. Really looks like sprites are getting culled after projection multiplication (indeed out of [-1,1] range in NDC.z coordinate). But it’s z == 1 in world space (also tried z == 0, same result)
Yes, I just change that to 100 again and it will be invisible with some probability. I mean - it’s not always works like that, reproduce rate is not 100%.
I have the very same issue. when I create new instances of the invisible GOs with the same properties, I can see them but then with no changes to them are suddenly invisible.
When I preview the main collection the GOs are there, but then when I run the project the GOs dissapear.
Do you mean run-time creation using a factory or simply duplicating them in a collection in the editor?
It is with almost 100% probability that it is like @sicher says, a z-order issue. The default render script accepts a range from -1.0 to 1.0. If a game object is on z=0.5 and a sprite component on the game object is given z=0.6 then you’ll have an aggregated z value of 1.1 and it is thus outside the range of what the render script will draw, but still visible in the scene editor since it doesn’t take into account the render script.
Not sure why this is marked as solved. Jura’s original post is not solved. I have the same issue and can reproduce similarly. This is the default spaceship tutorial so it’s not a z-order issue at all. The game objects go invisible. It is not a driver issue - Intel graphics driver utility mentions I have the most up-to-date.
it is an important thing that every newcomer must know!
I suggest mentioning that in the building block of defold or somewhere in the initial tutorials.