上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 48 下一页
摘要: 界面需要做国际化的时候,一般不会在Text组件上使用中文,而是使用id或者key来代替,这个代码用于检测直接写了中文的Text #if UNITY_EDITOR using System.Text; using System.Text.RegularExpressions; using UnityE 阅读全文
posted @ 2022-11-08 23:08 yanghui01 阅读(82) 评论(0) 推荐(0)
摘要: RenderTexture或Texture2D -> RenderTexture public static RenderTexture TextureRenderToRT(Texture srcTex) { var srcTempRT = RenderTexture.GetTemporary(sr 阅读全文
posted @ 2022-11-08 00:36 yanghui01 阅读(713) 评论(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 阅读(236) 评论(0) 推荐(0)
摘要: # 下载visual studio的在线安装包 下载 Visual Studio Tools - 免费安装 Windows、Mac、Linux (microsoft.com) # 在适当的位置新建一个文件夹,我是放在桌面了 C:\Users\win\Desktop\vs2022_offline # 阅读全文
posted @ 2022-11-07 00:01 yanghui01 阅读(31243) 评论(0) 推荐(5)
摘要: # 比如,美术直接给了一张原大小的弹框背景图,但实际该图可以做成九宫可拉伸格形式,但是美术又不愿意再重切一次, 那我们就自己来吧,先用Unity的9宫工具,框出要保留的四个角 # 然后再用工具执行下,就能得到这样一张图片 using System.IO; using UnityEditor; usi 阅读全文
posted @ 2022-10-29 01:25 yanghui01 阅读(142) 评论(0) 推荐(0)
摘要: (1) 通过可视化界面的方式设置,File -> Preferences -> Settings User是全局设置,保存在:C:\Users\{用户名}\AppData\Roaming\Code\User\settings.json Workspace是当前项目的设置,保存在:proj_dir/. 阅读全文
posted @ 2022-10-27 23:28 yanghui01 阅读(2310) 评论(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 阅读(63) 评论(0) 推荐(0)
摘要: # 功能就是原样显示一张贴图 Shader "My/Unlit" { Properties { _MainTex("Texture", 2D) = "white" {} } SubShader { Tags { "RenderType" = "Opaque" } LOD 100 Pass { CGP 阅读全文
posted @ 2022-08-14 22:27 yanghui01 阅读(185) 评论(0) 推荐(0)
摘要: 1) 自己计算 获取指定年月的天数 local m_MonthDaysMap = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, } function TimeUtil.GetMonthDays(year, month) if 2 == month 阅读全文
posted @ 2022-07-16 23:19 yanghui01 阅读(106) 评论(0) 推荐(0)
摘要: (1) 这边的高亮颜色是按照Idea的Darcula主题的语法高亮颜色设置的,主要是习惯了idea的配色 (2) 首先设置emmylua插件上定义的语法高亮颜色, ctrl+shift+p输入settings, 选择Open User Settings 可以在界面上进行设置,红色圈出来的颜色改下,D 阅读全文
posted @ 2022-07-09 17:14 yanghui01 阅读(1892) 评论(0) 推荐(0)
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 48 下一页