/// <summary>
/// Clear all draw calls.
/// </summary>
static public void ClearAll ()
{
bool playing = Application.isPlaying;
for (int i = mActiveList.size; i > 0; )
{
UIDrawCall dc = mActiveList[--i];
if (dc)
{
if (playing) NGUITools.SetActive(dc.gameObject, false);
else NGUITools.DestroyImmediate(dc.gameObject);
}
}
mActiveList.Clear();
}
/// <summary>
/// Immediately destroy all draw calls.
/// </summary>
static public void ReleaseAll ()
{
ClearAll();
for (int i = mInactiveList.size; i > 0; )
{
UIDrawCall dc = mInactiveList[--i];
if (dc) NGUITools.DestroyImmediate(dc.gameObject);
}
mInactiveList.Clear();
}