public static void Combine()
        {
            GameObject[] selection      = Selection.GetFiltered(typeof(GameObject), SelectionMode.Unfiltered | SelectionMode.ExcludePrefab).OfType <GameObject>().ToArray();
            GameObject   activeSelected = Selection.activeTransform == null?selection.FirstOrDefault() : Selection.activeTransform.gameObject;

            CombineResult result = MeshUtils.Combine(selection, activeSelected);
        }
Example #2
0
        private static void Combine()
        {
            GameObject[] selection      = Selection.GetFiltered(typeof(GameObject), SelectionMode.Unfiltered | SelectionMode.ExcludePrefab).OfType <GameObject>().ToArray();
            GameObject   activeSelected = Selection.activeTransform == null?selection.FirstOrDefault() : Selection.activeTransform.gameObject;

            CombineResult result = MeshUtils.Combine(selection, activeSelected);

            if (result != null)
            {
                MeshCombinerIntegration.RaiseCombined(result.GameObject, result.Mesh);
            }
        }