上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 49 下一页
摘要: 正数和负数的补码区别 1) 对于正数,原码和补码相同 2) 对于负数,先得到反码,再计算补码反码:除符号位外取反补码:反码+1 补码示例 1) 35原码:0010,0011补码:0010,0011 2) 18原码:0001,0010补码:0001,0010 3) -18原码:1001,0010反码: 阅读全文
posted @ 2022-11-19 22:02 yanghui01 阅读(563) 评论(0) 推荐(0)
摘要: 方式1:使用多个overrideController文件的方式 1) 创建一个通用的状态机,以及状态动画占位文件 2) 分别为不同的角色创建状态动画文件,并用overrideController进行绑定 a) Role1Override.overrideController,这边用正方形表示Role 阅读全文
posted @ 2022-11-09 01:05 yanghui01 阅读(1983) 评论(0) 推荐(0)
摘要: 界面需要做国际化的时候,一般不会在Text组件上使用中文,而是使用id或者key来代替,这个代码用于检测直接写了中文的Text #if UNITY_EDITOR using System.Text; using System.Text.RegularExpressions; using UnityE 阅读全文
posted @ 2022-11-08 23:08 yanghui01 阅读(86) 评论(0) 推荐(0)
摘要: RenderTexture或Texture2D -> RenderTexture public static RenderTexture TextureRenderToRT(Texture srcTex) { var srcTempRT = RenderTexture.GetTemporary(sr 阅读全文
posted @ 2022-11-08 00:36 yanghui01 阅读(720) 评论(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 阅读(32058) 评论(0) 推荐(5)
摘要: # 比如,美术直接给了一张原大小的弹框背景图,但实际该图可以做成九宫可拉伸格形式,但是美术又不愿意再重切一次, 那我们就自己来吧,先用Unity的9宫工具,框出要保留的四个角 # 然后再用工具执行下,就能得到这样一张图片 using System.IO; using UnityEditor; usi 阅读全文
posted @ 2022-10-29 01:25 yanghui01 阅读(148) 评论(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 阅读(2327) 评论(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 阅读(186) 评论(0) 推荐(0)
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 49 下一页