[MenuItem("NGUI/Refresh UIPanels/This Scene")]
public static void RefreshPanelsInThisScene()
{
Debug.Log("Refreshing all UIPanels in this scene...");
foreach (UIPanel panel
in GameObject
.FindObjectsOfType(typeof(UIPanel
))) {
Debug.Log("Refreshing panel: " + panel.name);
panel.Refresh();
}
Debug.Log("Saving Scene.");
EditorApplication.SaveScene();
}