随笔分类 -  Unity / Unity-Editor

摘要:UI图片在PC, Android, iOS平台上所用的格式设置为推荐的值。 #if UNITY_EDITOR using System.IO; using UnityEditor; using UnityEngine; public class UITextureConfig : AssetPost 阅读全文
posted @ 2023-03-17 23:09 yanghui01 阅读(126) 评论(0) 推荐(0) 编辑
摘要:Sprite Packer只能预览,没法拿到图集图片 菜单栏 -> Window -> 2D -> Sprite Packer 下面的工具可以将图集导出 #if UNITY_EDITOR using UnityEditor; using UnityEditor.Sprites; using Unit 阅读全文
posted @ 2023-03-17 22:38 yanghui01 阅读(132) 评论(0) 推荐(0) 编辑
摘要:代码 #if UNITY_EDITOR using System.Collections.Generic; using System.IO; using System.Text; using UnityEditor; using UnityEngine; public class CmdTool { 阅读全文
posted @ 2022-11-20 13:33 yanghui01 阅读(750) 评论(0) 推荐(0) 编辑
摘要:# 这个图框了3张小图,淡蓝色进度条,钻石图标,道具背景框,其中道具背景框还设置了border。 提取出的图片 #if UNITY_EDITOR using UnityEngine; using UnityEditor; using System.IO; public static class Sp 阅读全文
posted @ 2022-11-08 00:29 yanghui01 阅读(160) 评论(0) 推荐(0) 编辑
摘要:# 比如,美术直接给了一张原大小的弹框背景图,但实际该图可以做成九宫可拉伸格形式,但是美术又不愿意再重切一次, 那我们就自己来吧,先用Unity的9宫工具,框出要保留的四个角 # 然后再用工具执行下,就能得到这样一张图片 using System.IO; using UnityEditor; usi 阅读全文
posted @ 2022-10-29 01:25 yanghui01 阅读(69) 评论(0) 推荐(0) 编辑
摘要:# using System.IO; using UnityEditor; using UnityEngine; namespace xui.Editor { public class ResDeps { [MenuItem("Assets/myTool/打印依赖", false, 99)] pub 阅读全文
posted @ 2022-08-23 00:35 yanghui01 阅读(46) 评论(0) 推荐(0) 编辑
摘要:(1) ctrl使用% (2) alt使用& (3) shift使用# (4) 其他按钮使用_前缀,如:_W, _F1 public class MenuTest { [MenuItem("Window/MyMenu/Menu1 %1", false, 1)] static void Menu1() 阅读全文
posted @ 2022-06-24 22:38 yanghui01 阅读(252) 评论(0) 推荐(0) 编辑
摘要:# #if UNITY_EDITOR using UnityEditor; using UnityEngine; public class GizmosDrawAxis : MonoBehaviour { public Color color = Color.yellow; public bool 阅读全文
posted @ 2022-06-17 23:22 yanghui01 阅读(226) 评论(0) 推荐(0) 编辑
摘要:和SphereBoundsHandle的主要区别是这边有radius, height, heightAxis三个参数,没有size参数,其他基本一致 using UnityEditor; using UnityEditor.IMGUI.Controls; using UnityEngine; pub 阅读全文
posted @ 2022-06-17 00:04 yanghui01 阅读(35) 评论(0) 推荐(0) 编辑
摘要:# 和SphereBoundsHandle的主要区别是radius和size参数,其他基本一致 using UnityEditor; using UnityEditor.IMGUI.Controls; using UnityEngine; public class TestWindow : Edit 阅读全文
posted @ 2022-06-16 23:56 yanghui01 阅读(30) 评论(0) 推荐(0) 编辑
摘要:# Transform的默认编辑器类名不叫TransformEditor,而是叫TransformInspector。除了这个,其他基本和CustomRectTransformEditor类似 #if UNITY_EDITOR using System.Collections.Generic; us 阅读全文
posted @ 2022-06-15 23:26 yanghui01 阅读(169) 评论(0) 推荐(0) 编辑
摘要:public class TestWindow : EditorWindow { [MenuItem("Window/TestWindow")] static void ShowWindow() { var window = GetWindow<TestWindow>(); window.title 阅读全文
posted @ 2022-04-29 00:11 yanghui01 阅读(207) 评论(0) 推荐(0) 编辑
摘要:public class TestWindow : EditorWindow { [MenuItem("Window/TestWindow")] static void ShowWindow() { var window = GetWindow<TestWindow>(); window.title 阅读全文
posted @ 2022-04-25 23:41 yanghui01 阅读(40) 评论(0) 推荐(0) 编辑
摘要:# 一般界面多的项目,都会有一套自己的ui规范,比如:1级弹框的按钮文本用多大,什么字体,什么颜色,二级弹框的用什么, 新年活动风格的一套界面文本用多大,什么字体,什么颜色,圣诞活动风格的界面用什么。。。 # 每次ui给到界面示意图时,最痛苦的就是,文本样式都是按照之前的xxx界面。所以把这些规范放 阅读全文
posted @ 2022-04-03 17:03 yanghui01 阅读(183) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示