会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
就当笔记吧
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
43
44
45
46
47
48
49
下一页
2021年12月23日
RectMask2D裁剪Canvas无效问题
摘要: 类似下面这样的层级结构,白色区域为ScrollView可见区域,RectMask2D添加在ScrollView上。 可以看到Canvas下的Image1没被裁剪掉,不在Canvas下的Image2裁剪掉了。 【原因分析】 RectMask2D内部有一个裁剪对象列表,只有在这个列表中的对象才会被裁剪,
阅读全文
posted @ 2021-12-23 01:38 yanghui01
阅读(1259)
评论(0)
推荐(2)
2021年12月21日
使用PropertyDrawer来实现ReorderableList条目高度可变
摘要: TestAsset.cs 1 [CreateAssetMenu(menuName = "My/Test Asset")] 2 public class TestAsset : ScriptableObject 3 { 4 public List<TestAssetItem> list; 5 } Te
阅读全文
posted @ 2021-12-21 00:10 yanghui01
阅读(828)
评论(0)
推荐(0)
2021年12月17日
后续的gui全部禁用(灰显)
摘要: GUI.enabled的使用 1 public override void OnInspectorGUI() 2 { 3 GUILayout.Button("Button"); 4 EditorGUILayout.ToggleLeft("Toggle", true); 5 EditorGUILayo
阅读全文
posted @ 2021-12-17 23:33 yanghui01
阅读(312)
评论(0)
推荐(0)
编辑器SearchField+ReorderableList使用
摘要: 1 private SearchField _searchField; 2 private string _searchText; 3 private ReorderableList _choicesList; 4 private List<string> _allListItems; 5 6 pu
阅读全文
posted @ 2021-12-17 23:25 yanghui01
阅读(159)
评论(0)
推荐(0)
lua upvalue
摘要: 内嵌函数可以访问外包函数的局部变量,而这些局部变量则称为该内嵌函数的外部局部变量(或者upvalue) 1 function A(n) 2 3 function A_1() --n就是这个内嵌函数的upvalue 4 print(n) 5 end 6 7 return A_1 8 end 9 10
阅读全文
posted @ 2021-12-17 22:05 yanghui01
阅读(284)
评论(0)
推荐(0)
2021年12月4日
string find, gsub, gmatch使用
摘要: 【find实现字符串分割】 # 只支持ascii字符,不支持中文这种 function Split(str, delimiter) local arr = {} local index = 1 while true do local index1, index2 = string.find(str,
阅读全文
posted @ 2021-12-04 00:40 yanghui01
阅读(279)
评论(0)
推荐(0)
2021年11月13日
lua string匹配模式
摘要: 【lua的匹配模式可以看做是功能不完整的正则表达式,只实现了大部分】 使用过程中,遇到的不支持的功能: # 分组匹配多次, 比如: abcabc, 无法用(abc)+匹配到 # 匹配次数范围, 比如: a{1,3}这种, 最少匹配1次,最多匹配3次 【可以使用匹配模式的函数】 # string.fi
阅读全文
posted @ 2021-11-13 23:20 yanghui01
阅读(1071)
评论(0)
推荐(0)
lua 字符串使用
摘要: 1 --常见字符串功能 2 local function Test1() 3 --大小写 4 assert("AA" == string.upper("aa")) 5 assert("aa" == string.lower("AA")) 6 7 --字符串长度 8 assert(2 == strin
阅读全文
posted @ 2021-11-13 21:06 yanghui01
阅读(131)
评论(0)
推荐(0)
2021年11月12日
字符串拼接 StringBuilder
摘要: 函数参照c#的StringBuilder 1 require "utf8Ext" 2 3 StringBuilder = StringBuilder or {} 4 5 function StringBuilder.new() 6 local inst = {} 7 8 local charBuff
阅读全文
posted @ 2021-11-12 01:03 yanghui01
阅读(131)
评论(0)
推荐(0)
lua字符串长度
摘要: 【关于unicode和utf-8】 # unicode字符集,包含了全世界的字符,然而它只是规定了字符的二进制编码,并没有规定二级制编码是如何存储的。utf-8就是unicode的一个实现方式,就是怎么存储和读取这个unicode二进制编码。 就像一张jpg图片,我们可以选择直接存放在硬盘上,也可以
阅读全文
posted @ 2021-11-12 00:58 yanghui01
阅读(1565)
评论(0)
推荐(0)
上一页
1
···
43
44
45
46
47
48
49
下一页
公告