摘要: 使用System.Diagnostics.Stopwatch, using System; using System.Diagnostics; using System.Threading; class Program { static void Main(string[] args) { Stop 阅读全文
posted @ 2023-01-29 19:22 东羽白帝 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 从Fgui中的图集中取一个图素,把图素用到场景等非UI的地方。 此操作会动态创建一个Sprite对象,效率不好,不适合大量使用。 private static Dictionary<string, Sprite> cacheSpriteByFGUIDic = new Dictionary<strin 阅读全文
posted @ 2020-12-18 22:53 东羽白帝 阅读(530) 评论(0) 推荐(0) 编辑
摘要: https://www.zhihu.com/question/29603593 主要因为iOS系统的原因。 在这个知乎问题里,有两条回答,能解释我的疑惑。如下两个图。 我个人总结为,编译型语言(C#)热更,是更新动态链接库=》中间语言=》机器码=》申请可读写可执行的内存=》机器码放内存=》指令指针指 阅读全文
posted @ 2020-12-07 11:15 东羽白帝 阅读(503) 评论(0) 推荐(0) 编辑
摘要: C#层对象已经删除了,但是lua层判断不为nil。然后lua调用了,又会报nil的错误。 这里提供了一种判断方式。 lua里的判断。这个Util.IsNull()是C#层代码。 function HelperFunc.IsNull(obj) if obj == nil then return tru 阅读全文
posted @ 2020-11-27 22:18 东羽白帝 阅读(656) 评论(0) 推荐(0) 编辑
摘要: PlayerObj pobj = go.GetComponent<PlayerObj>(); if (pobj && pobj.IsMyTeam()) { marchActive = pobj.GetComponent<ActiveObjBehaviour>(); marchActive.ShowM 阅读全文
posted @ 2020-10-28 12:05 东羽白帝 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 报错信息如下: Error building Player because scripts had compiler errors Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, 阅读全文
posted @ 2020-10-27 22:05 东羽白帝 阅读(3064) 评论(0) 推荐(0) 编辑
摘要: 这个写的很好,https://zhuanlan.zhihu.com/p/59619632 阅读全文
posted @ 2020-10-10 11:47 东羽白帝 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 转自:https://blog.csdn.net/u010180140/article/details/104049958 原作者是用lua写的。明白用什么接口就好,什么语言不重要。 给定文本内容给Text组建,预先知道Text占用的宽高 利用TextGenerator,TextGeneration 阅读全文
posted @ 2020-10-09 20:08 东羽白帝 阅读(3520) 评论(0) 推荐(0) 编辑
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using DG.Tweening; public class UIDamage : MonoBe 阅读全文
posted @ 2020-09-28 21:46 东羽白帝 阅读(1205) 评论(0) 推荐(0) 编辑
摘要: 转自 https://www.jianshu.com/p/77fabc83555b using UnityEngine; [CreateAssetMenu(fileName = "UntitledInstaller", menuName = "MyAsset/UntitledInstaller")] 阅读全文
posted @ 2020-09-28 11:28 东羽白帝 阅读(1781) 评论(0) 推荐(0) 编辑