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:
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:
Now depth parameter is equivalent to the sort order.
Use sortable layers can be added to the panel, and similarly updated.
1. File:UIDrawCall.cs
Added code:
- public int sortingOrder
- {
- get { if (mRenderer != null) return mRenderer.sortingOrder; else return 0; }
- set { if (mRenderer != null && mRenderer.sortingOrder != value) mRenderer.sortingOrder = value; }
- }
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:
- 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.
