
C#
Unity小林
unity使我快乐。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c# ref、out、params、yield关键字的区别和使用
ref和out的区别 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace one { class Program { static void Main(string[...原创 2019-12-06 00:04:26 · 349 阅读 · 0 评论 -
c# 双向链表
我这里有两句代码用到了类对象池,有兴趣的可以去看看 封装了一些双向链表的常用方法。都是不难的,只要思路清晰了就o98k了。 using System.Collections; using System.Collections.Generic; using UnityEngine; public class ResourceManager : Singleton<ResourceManag...原创 2020-02-28 23:57:34 · 287 阅读 · 0 评论 -
c# 类对象池
类对象池存储的是类,当需要几十几百甚至更多的类进行频繁的使用和销毁时,就该使用类对象池了。 基本类对象池: using System.Collections; using System.Collections.Generic; using UnityEngine; public class ClassObjectPool<T> where T:class,new() { pr...原创 2020-02-28 15:30:56 · 2637 阅读 · 0 评论 -
C# xml序列化 二进制序列化 unity中的asset序列化
序列化是将对象保存为xml或json或二进制文件; 反序列化则是读取文件信息,还原为对象; 先建一个存储数据的类,添加标签表示可序列化 using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Xml.Serialization; [System.Serializable...原创 2020-02-26 22:10:49 · 369 阅读 · 0 评论