Hello Guest

Author Topic: Sorting Layers and Static Batching  (Read 4109 times)

jrhee

  • Newbie
  • *
  • Posts: 10
    • View Profile
Sorting Layers and Static Batching
« on: February 01, 2014, 08:26:02 am »
Hello,

Couple quick questions regarding static batching and Unity 4.3's sorting layers:

1) Is there any way to preserve the sorting layer when using the static batcher? It seems whenever a static batch is committed, the sorting layer of the underlying sprites is reset to the default.

2) Is there any way Order in Layer can be used with a static batch?

If neither of the above are possible, is there a recommended approach to ensuring correct sort order for static batched sprites?

Thanks! 

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sorting Layers and Static Batching
« Reply #1 on: February 01, 2014, 02:20:57 pm »
No, this is intentionally left out because once a model is merged into a static batch it can't then interact with Unity sprites. A static batch gets merged into one mesh, and only one sorting layer / order in layer can be assigned. i.e. they won't sort with other things outside the batch as they would before committing.

jrhee

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Sorting Layers and Static Batching
« Reply #2 on: February 01, 2014, 04:51:22 pm »
Makes sense, thanks for the quick reply  :)