public static void CreateEmptySibling(MenuCommand cmd) { var newOne = new GameObject(""); newOne.SetParent(cmd.GetGameObject().GetParent()); newOne.SetSiblingIndex(cmd.GetGameObject().GetSiblingIndex() + 1); }
public static void RenameChildrenAsFirstBehaviour(MenuCommand cmd) { Debug.Log($"Rename Children As Type Recursively for {cmd.GetGameObject().GetFindingPath()}"); foreach (Transform childTrf in cmd.GetGameObject().transform) { childTrf.gameObject.RenameAsTypeRecursively <Behaviour>(); } }
public static void SavePrefab(MenuCommand cmd) { if (cmd.GetGameObject().IsPrefabRoot()) { PrefabUtility.ApplyPrefabInstance(cmd.GetGameObject(), InteractionMode.UserAction); } else { Debug.LogWarning($"'{cmd.GetGameObject().GetFindingPath()}' is not a prefab root"); } }
public static void ParentUnderEmpty(MenuCommand cmd) { cmd.GetGameObject().AttachToNewEmptyParent(); }
public static void RenameDescendantsAsFirstBehaviours(MenuCommand cmd) { Debug.Log($"Rename As Type Recursively for {cmd.GetGameObject().GetFindingPath()}"); cmd.GetGameObject().RenameAsTypeRecursively <Behaviour>(); }
public static void RenameAsFirstBehaviour(MenuCommand cmd) { cmd.GetGameObject().RenameAsType <Behaviour>(); }
public static void DeleteChildren(MenuCommand cmd) { cmd.GetGameObject().RemoveChildren(); }
public static void DeactivateDescendants(MenuCommand cmd) { cmd.GetGameObject().SetDescendantActivities(false); }