随笔分类 - Unity
Unity
摘要:https://www.cnblogs.com/yikecaidechengzhangshi/p/6994408.html
阅读全文
摘要:安卓的emoji显示乱码,IOS没事,在input监听屏蔽即可 onValidateInput /// <summary> /// 输入框屏蔽emoji /// </summary> private readonly string[] pattens = {@"\p{Cs}", @"\p{Co}",
阅读全文
摘要:1.快速进入运行模式(2019以上版本可以) 值得注意的是这样设置会是的程序中的static变量会保留上次运行时的状态 2.设置Assembly 直接右键创建即可,创建了Assembly文件会把当前目录及其子目录编译到此Assembly中,所以会减少编译等待时间 一般需要对程序进行一个划分 ①商店资
阅读全文
摘要:https://blog.csdn.net/cyf649669121/article/details/105637064 可用于免费bug上报,或者数据分析
阅读全文
摘要:http://qiankanglai.me/2015/08/15/LoopScrollRect/ https://github.com/qiankanglai/LoopScrollRect
阅读全文
摘要:Unity Text 里面有个 Best Fit选项,这个当超过一行文字后就会自动缩小,不是超过整个文本框才自动缩小 使用以下组件可取代Text using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; //
阅读全文
摘要:框架: https://github.com/JiepengTan/LockstepEngine 教程: https://github.com/JiepengTan/Lockstep-Tutorial https://www.bilibili.com/video/BV1ZJ411F7Sn?p=1 帧
阅读全文
摘要:1.可以使用Unity自带的 ContextMenu 属性 小齿轮进行代码测试 2.使用插件 EasyButton https://github.com/madsbangh/EasyButtons 3.Unity自动化测试 https://zhuanlan.zhihu.com/p/434457455
阅读全文
摘要:链接 https://blog.csdn.net/yy763496668/article/details/113778086
阅读全文
摘要:转载自 https://cuihongzhi1991.github.io/blog/2020/05/27/builtinttourp/ 本篇文章转自Teofilo Dutra编写的《From Built-in to URP》,其中有很多在写URP管线Shader时需要用到的函数,作为备忘速查表非常实
阅读全文
摘要:属性 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; [AttributeUsage(AttributeTargets.Field, Inherited = tr
阅读全文
摘要:需要使用 Unity-ui-extensions 包 使用添加 [ReadOnly]就行
阅读全文
摘要:安装MongoDB(最好装C盘): https://www.runoob.com/mongodb/mongodb-window-install.html 安装可视化软件Robo3T:https://robomongo.org/ 连接MongoDB实例: using System.Collection
阅读全文
摘要:Roslyn C# 下载地址:https://files-cdn.cnblogs.com/files/sanyejun/RoslynC_RuntimeCompiler.zip 使用示例 using System.Collections; using System.Collections.Generi
阅读全文
摘要:直接上代码 /// <summary> /// 修复图片导入时白边问题 /// </summary> /// <param name="texture"></param> public static void FixTransparency(this Texture2D texture) { Col
阅读全文
摘要:抄的Unity的源码 HandleUtility.DistancePointLine 是UnityEditor代码,源码如下,这样就可以在Runtime中运行 注意性能开销! /// <summary> /// 计算点到线段的最短距离 /// </summary> /// <param name="
阅读全文
摘要:写在Update里面 var newPos = transform.position; if (lastPos != newPos) { targetRotation = Quaternion.LookRotation(newPos - lastPos); } if (Math.Abs(transf
阅读全文
摘要:nity3D有一个叫做”live recompile”的功能,即在编辑器处于播放状态时修改脚本代码或替换托管dll等操作时,当场触发重新编译生成项目脚本assembly,并会进行重新加载操作,然而,这个功能很多时候并不能保证重加载后的代码逻辑依然能正常运行,轻则报错,重则卡死。经过博主测试发现,Un
阅读全文
摘要:客户端 using System; using System.Collections; using System.Collections.Generic; using System.Net; using System.Text; using System.Threading; using Newto
阅读全文