public static void Combine(GameObject staticBatchRoot, bool combineOnlyStatic, bool isEditorPostprocessScene)
{
GameObject[] objArray = (GameObject[]) UnityEngine.Object.FindObjectsOfType(typeof(GameObject));
List<GameObject> list = new List<GameObject>();
foreach (GameObject obj2 in objArray)
{
if (((staticBatchRoot == null) || obj2.transform.IsChildOf(staticBatchRoot.transform)) && (!combineOnlyStatic || obj2.isStaticBatchable))
{
list.Add(obj2);
}
}
CombineGameObjects(list.ToArray(), staticBatchRoot, isEditorPostprocessScene);
}