public static void Combine(GameObject staticBatchRoot, bool combineOnlyStatic)
        {
            GameObject[]      array = (GameObject[])Object.FindObjectsOfType(typeof(GameObject));
            List <GameObject> list  = new List <GameObject>();

            GameObject[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                GameObject gameObject = array2[i];
                if (!(staticBatchRoot != null) || gameObject.transform.IsChildOf(staticBatchRoot.transform))
                {
                    if (!combineOnlyStatic || gameObject.isStaticBatchable)
                    {
                        list.Add(gameObject);
                    }
                }
            }
            array = list.ToArray();
            if (!Application.HasProLicense() && !Application.HasAdvancedLicense() && staticBatchRoot != null && array.Length > 0)
            {
                Debug.LogError("Your Unity license is not sufficient for Static Batching.");
            }
            InternalStaticBatchingUtility.Combine(array, staticBatchRoot);
        }