private static void MakeEditable(Object obj) { EditableManager.SetEditable(obj, true); GameObject go = obj as GameObject; if (go) { foreach (var componentIt in go.GetComponents <Component>()) { EditableManager.SetEditable(componentIt, true); } } }
private static void RefreshEditable() { Object[] selection = Selection.objects; if (selection == null || selection.Length == 0) { previousSelectionHash = 0; } else if (previousSelectionHash != GetSelectionHash(ref selection)) { MakePreviousEditable(); foreach (var selectionIt in selection) { if (selectionIt is GameObject) { EditableManager.RefreshEditableObject(selectionIt as GameObject); } } previousSelection = selection; previousSelectionHash = GetSelectionHash(ref selection); } }