Skip to content

Instantly share code, notes, and snippets.

@dogles
Created December 17, 2014 14:38
Show Gist options
  • Save dogles/bf53600cfbe7fd8710bd to your computer and use it in GitHub Desktop.
Save dogles/bf53600cfbe7fd8710bd to your computer and use it in GitHub Desktop.
UIPanel.cs change
--- UIPanel-old.cs 2014-12-17 09:36:13.000000000 -0500
+++ UIPanel-new.cs 2014-12-12 13:10:36.000000000 -0500
@@ -1157,19 +1157,19 @@
{
p.startingRenderQueue = rq;
p.UpdateDrawCalls();
- rq += p.drawCalls.size;
+ rq += p.drawCalls.size*2;
}
else if (p.renderQueue == RenderQueue.StartAt)
{
p.UpdateDrawCalls();
if (p.drawCalls.size != 0)
- rq = Mathf.Max(rq, p.startingRenderQueue + p.drawCalls.size);
+ rq = Mathf.Max(rq, p.startingRenderQueue + p.drawCalls.size*2);
}
else // Explicit
{
p.UpdateDrawCalls();
if (p.drawCalls.size != 0)
- rq = Mathf.Max(rq, p.startingRenderQueue + 1);
+ rq = Mathf.Max(rq, p.startingRenderQueue + 2);
}
}
}
@@ -1408,7 +1408,7 @@
t.rotation = rot;
t.localScale = scale;
- dc.renderQueue = (renderQueue == RenderQueue.Explicit) ? startingRenderQueue : startingRenderQueue + i;
+ dc.renderQueue = (renderQueue == RenderQueue.Explicit) ? startingRenderQueue : startingRenderQueue + i*2;
dc.alwaysOnScreen = alwaysOnScreen &&
(mClipping == UIDrawCall.Clipping.None || mClipping == UIDrawCall.Clipping.ConstrainButDontClip);
dc.sortingOrder = mSortingOrder;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment