static void Combine(MenuCommand command) { Logger.Instance.AddLog("SuperCombiner", "Combine All..."); SuperCombiner sc = (SuperCombiner)command.context; sc.CombineChildren(); }
static bool IsUnCombined(MenuCommand command) { SuperCombiner sc = (SuperCombiner)command.context; if (sc._combiningState == SuperCombiner.CombineStatesList.Uncombined) { return(true); } else { return(false); } }
/// <summary> /// Raises the enable event. /// </summary> private void OnEnable() { _superCombiner = (SuperCombiner)target; _serializedCombiner = new SerializedObject(_superCombiner); _customShaderProperties = _serializedCombiner.FindProperty("_customTextureProperies"); for (int i = 0; i < MAX_MULTI_MATERIAL_COUNT; i++) { _multiMaterialsSC.Add(_serializedCombiner.FindProperty("multiMaterials" + i)); _multiMaterialsOrder.Add(i); } }
static void UnCombineSelected() { foreach (GameObject obj in Selection.gameObjects) { SuperCombiner sc = obj.GetComponent <SuperCombiner> (); if (sc != null) { if (sc._combiningState != SuperCombiner.CombineStatesList.Uncombined) { sc.UnCombine(); } } } }
static void Save(MenuCommand command) { SuperCombiner sc = (SuperCombiner)command.context; sc.Save(); }