Hello Guest

Author Topic: UIMask doesn't support Sorting Layers  (Read 4143 times)

rocket5tim

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 1
    • View Profile
UIMask doesn't support Sorting Layers
« on: December 05, 2013, 02:48:05 pm »
To reproduce, open up the demo "4 - UI Masks" scene, select "1 - Behind" in the Hierarchy and then assign it to a Sorting Layer.  Notice that the object which is behind the DepthMask object is now obscured by it.

Do you know of a workaround or is there something I've missed?  This pretty much breaks my UI unless I ditch sorting layers (which I'd rather not do).

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: UIMask doesn't support Sorting Layers
« Reply #1 on: December 05, 2013, 06:09:58 pm »
Masks can't work with sorting layers directly, but if you sequence the mask to render at the correct point yourself, that will work fine.
The mask needs to draw BEFORE the stuff its masking, but after everything else its drawing on top of.

The current inspector doesn't expose the necessary SortingLayer parameter, drop me an email at support at unikronsoftware.com and I'll get you a patch.