会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
就当笔记吧
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
32
33
34
35
36
37
38
39
40
···
48
下一页
2022年12月18日
Playable API - 播放单个Animation Clip
摘要: 用到的模型资源:GitHub - unity3d-jp/unitychan-crs: Unity-Chan "Candy Rock Star" Live Demo 这边直接在他提供的Scene上修改 思路:AnimationClipPlayable可以关联单个AnimationClip,这边Anim
阅读全文
posted @ 2022-12-18 00:59 yanghui01
阅读(491)
评论(0)
推荐(0)
2022年11月26日
RectTransform详解
摘要: 示意图 1) anchor区域(浅绿色方框区域) Vector2 anchorMin; anchor区域左下角与parent左下角的距离百分比(用parent大小的百分比表示) Vector2 anchorMax; anchor区域的右上角与parent右上角的距离百分比(用parent大小的百分比
阅读全文
posted @ 2022-11-26 00:36 yanghui01
阅读(1024)
评论(1)
推荐(0)
2022年11月22日
Sprite的几个属性的解释
摘要: 1) Rect rect; a) Sprite Mode为Single时: x, y总是为0; width, height为裁掉空白像素前的大小 b) Sprite Mode为Multiple时: 则x, y为slice区域在Sprite上的位置, 大小为slice区域的大小 2) Vector2
阅读全文
posted @ 2022-11-22 00:38 yanghui01
阅读(1129)
评论(0)
推荐(1)
2022年11月21日
Sprite Pack打包图集以及获取Sprite
摘要: 开启Sprite Pack 图集打包 Packing Tag设置成相同名字的图片就会被打包进同一个图集a) 图集common_ui b) 图集icon 查看图集 菜单 -> Window -> 2D -> Sprite Packer 获取图集中的Sprite Sprite Pack打包的图集,Uni
阅读全文
posted @ 2022-11-21 00:52 yanghui01
阅读(1426)
评论(0)
推荐(0)
2022年11月20日
unity下执行命令行
摘要: 代码 #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
阅读(836)
评论(0)
推荐(0)
2022年11月19日
Animator工具函数收集
摘要: 1) 获取AnimationClip public static bool TryGetAnimatorClip(Animator animator, string clipName, out AnimationClip outClip) { var clips = animator.runtime
阅读全文
posted @ 2022-11-19 22:48 yanghui01
阅读(118)
评论(0)
推荐(0)
位操作技巧:正数不取反,负数取反
摘要: 原理 1) 异或运算法则:异或的两个bit相同结果为1,不同结果为02) 一个数^0还是自身, 没有任何效果,因为0^0=0, 1^0=1。例子:0b0101,1010 ^ 0b0000,0000=0b0101,10103) 单个bit^1是取反的效果,0^1=1, 1^1=0,所以一个int变量^
阅读全文
posted @ 2022-11-19 22:32 yanghui01
阅读(153)
评论(0)
推荐(0)
位操作对符号位的影响
摘要: 先上结论 1) 右移:左侧会使用符号位补齐,比如:对于负数,右移时左侧补1;对于正数,右移时左侧补0;2) 左移:符号位也会被左移,右侧补03) 取反:符号位也会被取反 测试代码 //有符号数 static void Print(int a) { Console.WriteLine($"{Conve
阅读全文
posted @ 2022-11-19 22:10 yanghui01
阅读(89)
评论(0)
推荐(0)
补码复习
摘要: 正数和负数的补码区别 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
阅读(558)
评论(0)
推荐(0)
2022年11月9日
AnimatorOverrideController的2种使用方式
摘要: 方式1:使用多个overrideController文件的方式 1) 创建一个通用的状态机,以及状态动画占位文件 2) 分别为不同的角色创建状态动画文件,并用overrideController进行绑定 a) Role1Override.overrideController,这边用正方形表示Role
阅读全文
posted @ 2022-11-09 01:05 yanghui01
阅读(1952)
评论(0)
推荐(0)
上一页
1
···
32
33
34
35
36
37
38
39
40
···
48
下一页
公告