Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mudart

Pages: [1]
1
NGUI 3 Support / Re: NGUI, 4.3 and new Sortyng Layers
« on: February 14, 2014, 08:26:45 PM »
Faced with this problem. Found a simple solution.

1. File:UIDrawCall.cs
Added code:
  1.    
  2. public int sortingOrder
  3. {
  4.     get { if (mRenderer != null) return mRenderer.sortingOrder; else return 0; }
  5.     set { if (mRenderer != null && mRenderer.sortingOrder != value) mRenderer.sortingOrder = value; }
  6. }
  7.  


2. File:UIPanel.cs Method:UpdateDrawCalls
/// Update all draw calls associated with the panel

Find a cycle update all drawCalls (NGUI v3.49, #1180 string)
dc.clipping = clipping; - etc

Added code:
  1. if (dc.sortingOrder != depth) dc.sortingOrder = depth;

Now depth parameter is equivalent to the sort order.
Use sortable layers can be added to the panel, and similarly updated.

Pages: [1]