I’m trying to add some icons to the GUI node. I use two Pictures, one for the background and one for the actual content. Both the background and icon have transparency (useAlpha set to true when loading the image for Picture). Then I try to bring the content forward on Z axis so it would be in the foreground. No matter what value I use, the result is always completely random. Some of the icons are proper, but most are not. Which ones are correct also changes every time I relaunch the app.
Probably because it takes your nicely sortable separate objects and turns them into one big object that can no longer be sorted by Z value. So you get whatever sort order it decided to batch.
In my opinion, it would be nice if it provided a way to sort the geometries (custom comparator or whatever)… but I think the version that takes a list probably leaves them in that list order. So you might be able to hack around it.
No, I didn’t really try it since I’m running low on time and I have things with higher priority to do right now than worrying about one batch not working. After I finish the actual editor I will revisit this.
I think I can abandon this, since I don’t need batching anymore. For some reason my phone was falling back to OpenGL ES 1.0. Forcing it to use 2.0 increased my fps a ton and now I’m not really worrying about batching.