{"id":13663988,"url":"https://github.com/liuhaopen/UGUI-Editor","last_synced_at":"2025-04-25T20:31:56.491Z","repository":{"id":43779626,"uuid":"125616609","full_name":"liuhaopen/UGUI-Editor","owner":"liuhaopen","description":"Unity UGUI editor tools,improve the efficiency of ui development.","archived":false,"fork":false,"pushed_at":"2019-07-25T01:26:30.000Z","size":1041,"stargazers_count":866,"open_issues_count":5,"forks_count":190,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-04-04T11:13:06.475Z","etag":null,"topics":["ugui","unity","unity-editor","unity3d-plugin"],"latest_commit_sha":null,"homepage":"https://blog.csdn.net/column/details/20582.html","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liuhaopen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-17T10:00:39.000Z","updated_at":"2025-03-25T06:25:21.000Z","dependencies_parsed_at":"2022-09-01T04:51:34.667Z","dependency_job_id":null,"html_url":"https://github.com/liuhaopen/UGUI-Editor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuhaopen%2FUGUI-Editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuhaopen%2FUGUI-Editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuhaopen%2FUGUI-Editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuhaopen%2FUGUI-Editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liuhaopen","download_url":"https://codeload.github.com/liuhaopen/UGUI-Editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250890630,"owners_count":21503525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ugui","unity","unity-editor","unity3d-plugin"],"created_at":"2024-08-02T05:02:43.072Z","updated_at":"2025-04-25T20:31:56.065Z","avatar_url":"https://github.com/liuhaopen.png","language":"C#","readme":"# UGUI开发流程\n用法:下载并解压文件夹放到你项目Assets文件夹里就可以了(文件夹命名为UGUI-Editor,如果想用其它名字还需修改下Configure.cs文件里FolderName字段,否则会报错找不到资源的).也可以用git subtree作为子库管理,如:  \ngit subtree add --prefix=Assets/UGUI-Editor https://github.com/liuhaopen/UGUI-Editor.git master --squash  \n默认大部分功能都是开启的,如果你觉得哪些用得不顺手,可以在Configure.cs文件里关闭相应功能,设为false保存一下就会立即生效的:  \n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/configure.png)\n\n## PrefabWin窗口\n一般一些通用常用的资源我们都会做成prefab,比如某些按钮,文本样式等,然后用到时就在Project视图把它拉入场景,但project视图看不到prefab的预览图,都是蓝色的方块比较难辩认,所以可以用PrefabWin这个窗口拉控件出去,拉到场景时会判断控件落在哪个Canvas上,有则挂其上,无则自动生成一个Canvas,然后右键保存为一个界面prefab:  \n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/prefab_win.gif)  \nPrefabWin窗口可以从菜单Window-\u0026gt;PrefabWin打开  \nPrefabWin窗口一开始时肯定是没东西的啦,你可以往里面拉prefab,然后它会自动生成预览图的.2D3D的prefab都可以.底下还有个搜索框可以让你快速过滤.  \n\n## 参考图\n一般做界面,我们就按美术出的图,那里拉个按钮,那里弄个文本,其坐标大小比例等肯定要严格按美术出的图来调节的,所以编辑界面时最好就有张参考图,添加方式如下:  \n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/consult_pic.gif)  \n参考图的资源可来自项目外的目录,且右键保存界面时会跳过它的.另外就是每当你保存该界面,UIEditor会保存该界面上的所有参考图的图片和大小坐标等信息,下次打开时会自动加载.  \n添加参考图后,可以选中它后右键菜单-\u0026gt;锁定,这样就不会碍着你了.    \n对了,顺便说下选中节点后可以用方向键调节节点的坐标,每次加减1.  \n\n## 拉图生成Image节点  \n在Project视图拉图到场景的Canvas(无则自动生成Canvas),将生成一Image节点并把图赋在其上.还有就是选中Image节点时再点击Project视图里的图片也可以赋上该图.  \n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/drag_pic.gif)\n\n## 优化层次\n下图有8个节点,其中4个图片中,有两个图片来自图集1,两个来自图集2,如果它们是按图集连续排的话就可以合为同一批次,但被其它图集打断就合不了了,另外4个text也是一样,同一字体的也是可以合为一批次的,这个功能就是自动排列好顺序优化合批:  \n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/optimize_depth_for_batch_draw.gif)  \n\n## 查找资源引用\n有时一些旧资源想删而不敢删,怕其它地方用到了,这时可以在Project视图右键菜单查找整个项目里有哪些prefab用到了该资源:\n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/find_references.gif)  \n\n## 打开整个文件夹里的prefab界面\n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/open_folder.gif)  \n\n## 合并组和解体\n有时需要把几个节点合成一个组,这时可以这样:  \n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/make_group.gif)  \n\n## 排列和清理所有界面\n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/sort_and_clean.gif)\n\n## 对齐工具\n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/align_menu.png)\n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/align_tool.gif)  \n\n## 运行时修改防重置\n运行时可以放心地修改并保存prefab,结束运行时也会重新加载到最新的(默认情况下unity结束运行后是会重置到运行前的状态的)  \n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/reload_after_exit.gif)   \n\n## 显示界面名\n按Ctrl+E切换显示或隐藏所有的界面名\n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/show_layout_name.gif)   \n\n## 其它功能\n)运行结束后重新加载所有正在编辑的界面(因为运行期间的修改在运行结束后会重置的)  \n)运行时打开的界面,退出运行时Unity会自动清掉的,所以我们要记录下来,退出时重新打开  \n)记录每个界面的参考图信息(现在每次重新打开界面都要添加一次参考图太麻烦了)  \n)增加右键菜单:优化层级,文字放一起,同一图集的放一起  \n)按ctrl+shift+c可以复制选中的节点名到剪切板上,生成的字符串是带路径的:  \n![image](https://github.com/liuhaopen/ReadmeResources/blob/master/UGUI-Editor/copy_nodes.png)\n\n## TODO  \n)界面优化大全:选中某界面后遍历其所有子节点并在一个window列出优化建议(比如Text别用bestfix,用到了其它图集的小图等等)  \n)支持大部分操作的Undo(在操作前用Undo这个工具类记录)(30%)  \n)右键显示颜色框(有时代码要设置颜色值可以用的)  \n)Hierarchy界面也要显示我们的右键菜单  \n\n\n","funding_links":[],"categories":["C\\#","C#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuhaopen%2FUGUI-Editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliuhaopen%2FUGUI-Editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuhaopen%2FUGUI-Editor/lists"}