摘要:
转载自 https://cuihongzhi1991.github.io/blog/2020/05/27/builtinttourp/ 本篇文章转自Teofilo Dutra编写的《From Built-in to URP》,其中有很多在写URP管线Shader时需要用到的函数,作为备忘速查表非常实 阅读全文
摘要:
如果你直接读就会报错 IOException: Sharing violation on path ***** 因为文件已经被占用 所以你需要用 FileShare.ReadWrite 打开它 FileStream stream = File.Open("myfile.xlsx", FileMode 阅读全文
摘要:
文档:https://ecsrx.gitbook.io/project/ github: https://github.com/EcsRx/ecsrx.unity 阅读全文
摘要:
属性 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 阅读全文
摘要:
1.if else 不要超过3个分支 2.switch case 禁用 3.枚举,慎用,如果增加枚举其他地方不修改可使用,否则不能使用 4.if括号内的条件判断,不要超过2个 为什么不要超过2个,超过2个就是3个,5个,10个,上次还见到过一个20个的 这种优化,使用委托即可完成优化,类该拆分的拆分 阅读全文
摘要:
抄的Unity的源码 HandleUtility.DistancePointLine 是UnityEditor代码,源码如下,这样就可以在Runtime中运行 注意性能开销! /// <summary> /// 计算点到线段的最短距离 /// </summary> /// <param name=" 阅读全文