I’m having a problem with a scroll panel which is affecting my batch count. I have a horizontal scrolling object (green object on the right) right beside another game object with an image and text (orange object on the left). I’m using a RectMask2d in the scroll panel. When I scroll the content to the left, the content is masked, as expected, but it still increases my draw count when the hidden content overlaps the visible content of the object beside it. Any idea how I can fix that problem?
I’m using Unity 5.3.3. Any other information you need?
Update:
After some investigation, I have found the reason I’m getting two extra batches. The first is for the image associated with the rectMask2d, which I’m using a 1x1 transparent pixel (although I have used a non-transparent pixel and set the alpha of the image to zero to the same effect), and the second is for the content, which is masked.
Both of this things are invisible, so I don’t know why I’m getting batches that draw nothing.
An extension of this, is that my horizontal scroll panel is doing two batches, one for the invisible mask, then one for the content on top of it. I have the transparent mask graphic on the same sprite sheet as the graphics from the graphical content. So I don’t know why I’m getting two batches there since they are the same material, and furthermore, one isn’t visible.
Extra Info
I realized that in my original post I did not state that my game is entirely 2D, mostly menu-driven, and my content is all sprites and text boxes embedded in game objects.