Undo.IncrementCurrentGroup();//需要撤回的操作写这里GameObject obj = Instantiate(mc.treePrefabs[treeArrayNum], hit.point, Quaternion.identity);DestroyImmediate(obj, true);Undo.DestroyObjectImmediate(obj);Undo.RegisterCreatedObjectUndo(obj, "创建单个物体" + obj.name);
100字范文,内容丰富有趣,生活中的好帮手!