图集
This commit is contained in:
@@ -54,5 +54,18 @@ namespace AibisDream.SystemEditor
|
||||
|
||||
return SortingLayer.layers[idx].id;
|
||||
}
|
||||
|
||||
public static void RecordObjectAndChildren(GameObject parent, string actionName)
|
||||
{
|
||||
Transform[] transforms = parent.GetComponentsInChildren<Transform>(true);
|
||||
Object[] objectsToUndo = new Object[transforms.Length];
|
||||
|
||||
for (int i = 0; i < transforms.Length; i++)
|
||||
{
|
||||
objectsToUndo[i] = transforms[i].gameObject;
|
||||
}
|
||||
|
||||
Undo.RegisterCompleteObjectUndo(objectsToUndo, actionName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user