上一页 1 2 3 4 5 6 ··· 40 下一页
摘要: 已经有ugui Text了,为什么还要再来个TextMeshPro? 1) TextMeshPro使用了更先进的渲染技术,渲染效果更好。 同样的36号斜体字在Scene窗口中,我们放大后,Text可以明显的看到锯齿,而TextMeshPro字体的边缘还是圆润光滑。 2) TextMeshPro默认支 阅读全文
posted @ 2024-04-30 23:45 yanghui01 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 这个仅仅是修改fnt,不负责从fnt生成unity字体文件。 fnt生成字体文件看这边:ugui位图字体使用 - fnt生成fontsettings工具 效果 工具代码 public class FntEditTool : EditorWindow { [MenuItem("MyTools/Fnt 阅读全文
posted @ 2024-04-30 00:08 yanghui01 阅读(13) 评论(0) 推荐(0) 编辑
摘要: c#自带函数 //字符 -> charCode int charCode = char.ConvertToUtf32(str, 0); //charCode -> 字符 string ch = char.ConvertFromUtf32(charCode); 自己实现:字符 -> charCode 阅读全文
posted @ 2024-04-29 23:22 yanghui01 阅读(2) 评论(0) 推荐(0) 编辑
摘要: fnt文件生成unity字体的原理其实就是渲染图集Atlas上的Sprite,这边直接利用Unity自带的图集工具生成fnt文件 注意:这里生成的fnt文件还没法直接用,因为没有关联字符,这个工具只是第1步,第2步要用Fnt编辑工具关联字符:Fnt文件编辑工具 效果 public class Spr 阅读全文
posted @ 2024-04-29 22:17 yanghui01 阅读(8) 评论(0) 推荐(0) 编辑
摘要: public class SpriteAtlasExportTool : EditorWindow { const string MenuItemPath_ExportSelectSpriteAtlas = "MyTools/Export Select SpriteAtlas"; [MenuItem 阅读全文
posted @ 2024-04-28 22:54 yanghui01 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 两个列表是否相同 function IsTwoListValueSame(list1, list2) local cnt1 = #list1 local cnt2 = #list2 if cnt1 ~= cnt2 then return false end local tab = {} local 阅读全文
posted @ 2024-04-20 23:16 yanghui01 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 枚举 public enum MyFontStyleMask { Bold = 1, Italic = 1 << 1, Outline = 1 << 2, } //枚举转int { int a = (int)MyFontStyleMask.Italic; int b = Convert.ToInt3 阅读全文
posted @ 2024-04-14 00:25 yanghui01 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 删除所有匹配的元素 function RemoveMatchItems(list, matchFunc) local removeCt = 0 local ct = #list local i = 1 while i <= ct do if matchFunc(list[i]) then table 阅读全文
posted @ 2024-04-13 23:12 yanghui01 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 效果 枚举 public enum MyFontStyleMask { Bold = 1, Italic = 1 << 1, Outline = 1 << 2, } 标签类 using UnityEngine; public class MyEnumMaskAttribute : PropertyA 阅读全文
posted @ 2024-04-12 22:15 yanghui01 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 效果 枚举 public enum MyFontStyle { Bold, Italic, Outline, } public enum MyFontStyleMask { Bold = 1, Italic = 1 << 1, Outline = 1 << 2, } 标签类 using UnityE 阅读全文
posted @ 2024-04-12 22:06 yanghui01 阅读(7) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 40 下一页