Hello Guest

Author Topic: some 2dTextMesh and batching  (Read 5228 times)

coolTool

  • Newbie
  • *
  • Posts: 8
    • View Profile
some 2dTextMesh and batching
« on: August 14, 2012, 09:44:45 pm »
hi
in scene show 1 drawcall (3 batched)
in game show 3 drawcall (1 batched)
screenshots:

ps (unity 3,5,0).
« Last Edit: August 14, 2012, 10:54:23 pm by coolTool »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: some 2dTextMesh and batching
« Reply #1 on: August 15, 2012, 12:02:17 am »
I can't tell from the screenshot - what platform is the build target?

Edit: You should get perfect batching on all platforms apart from flash, since Unity don't support dynamic batching on it yet (the Flash export isn't final in 3.5.x). There are a few criteria for dynamic batching - if you meet all of them, then the batches should work. What is the MaxChars on those textmeshes?
« Last Edit: August 15, 2012, 12:05:03 am by unikron »

coolTool

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: some 2dTextMesh and batching
« Reply #2 on: August 15, 2012, 12:38:47 am »
target platform is android
 MaxChars is 16


update Unity3d to 3,5,5
« Last Edit: August 15, 2012, 12:47:56 am by coolTool »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: some 2dTextMesh and batching
« Reply #3 on: August 15, 2012, 01:10:10 am »
All of them have the same transform.localScale?

This is weird, shouldnt happen. Can you send a repro to support@unikronsoftware.com?

coolTool

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: some 2dTextMesh and batching
« Reply #4 on: August 15, 2012, 01:21:08 am »
localScale:                    x   y   z
1 textMesh         0.5  0.5  1
2 textMesh         0.5  0.5  1
3 textMesh         0.5  0.5  1

set localScale  to
scale:                    x   y   z
1 textMesh         0.5  0.5  0.5
2 textMesh         0.5  0.5  0.5
3 textMesh         0.5  0.5  0.5
and problem is solved
« Last Edit: August 15, 2012, 01:25:08 am by coolTool »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: some 2dTextMesh and batching
« Reply #5 on: August 15, 2012, 01:32:05 am »
Cool. The unity dynamic batching rules are weird. Always prefer the text mesh / sprite scale over transform.localScale - that doesn't break batching.