上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 43 下一页
摘要: 需要使用 Unity-ui-extensions 包 使用添加 [ReadOnly]就行 阅读全文
posted @ 2021-06-30 17:58 三页菌 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 安装MongoDB(最好装C盘): https://www.runoob.com/mongodb/mongodb-window-install.html 安装可视化软件Robo3T:https://robomongo.org/ 连接MongoDB实例: using System.Collection 阅读全文
posted @ 2021-06-21 15:01 三页菌 阅读(35) 评论(0) 推荐(0) 编辑
摘要: Roslyn C# 下载地址:https://files-cdn.cnblogs.com/files/sanyejun/RoslynC_RuntimeCompiler.zip 使用示例 using System.Collections; using System.Collections.Generi 阅读全文
posted @ 2021-06-18 12:29 三页菌 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 直接上代码 /// <summary> /// 修复图片导入时白边问题 /// </summary> /// <param name="texture"></param> public static void FixTransparency(this Texture2D texture) { Col 阅读全文
posted @ 2021-06-06 21:57 三页菌 阅读(759) 评论(0) 推荐(0) 编辑
摘要: 1.if else 不要超过3个分支 2.switch case 禁用 3.枚举,慎用,如果增加枚举其他地方不修改可使用,否则不能使用 4.if括号内的条件判断,不要超过2个 为什么不要超过2个,超过2个就是3个,5个,10个,上次还见到过一个20个的 这种优化,使用委托即可完成优化,类该拆分的拆分 阅读全文
posted @ 2021-06-06 19:14 三页菌 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 抄的Unity的源码 HandleUtility.DistancePointLine 是UnityEditor代码,源码如下,这样就可以在Runtime中运行 注意性能开销! /// <summary> /// 计算点到线段的最短距离 /// </summary> /// <param name=" 阅读全文
posted @ 2021-06-04 17:00 三页菌 阅读(778) 评论(0) 推荐(0) 编辑
摘要: bool ContainsPoint(List<Vector2> polyPoints, Vector2 p) { var j = polyPoints.Count - 1; var inside = false; for (int i = 0; i < polyPoints.Count; j = 阅读全文
posted @ 2021-06-04 12:07 三页菌 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 写在Update里面 var newPos = transform.position; if (lastPos != newPos) { targetRotation = Quaternion.LookRotation(newPos - lastPos); } if (Math.Abs(transf 阅读全文
posted @ 2021-06-03 19:42 三页菌 阅读(111) 评论(0) 推荐(0) 编辑
摘要: nity3D有一个叫做”live recompile”的功能,即在编辑器处于播放状态时修改脚本代码或替换托管dll等操作时,当场触发重新编译生成项目脚本assembly,并会进行重新加载操作,然而,这个功能很多时候并不能保证重加载后的代码逻辑依然能正常运行,轻则报错,重则卡死。经过博主测试发现,Un 阅读全文
posted @ 2021-06-03 15:37 三页菌 阅读(4752) 评论(0) 推荐(0) 编辑
摘要: 原因:在初始化配置Git用户信息时,设置了用户密码 解决方式:重置用户密码,并设置为空 $ ssh-keygen -p Enter file in which the key is (/c/Users/xxx/.ssh/id_rsa): (直接Enter)Enter old passphrase:( 阅读全文
posted @ 2021-06-03 15:25 三页菌 阅读(88) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 43 下一页