上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 48 下一页
摘要: # 展示最近打开的预制体历史 # 通过左右箭头就能快速打开最近打开过的预制体 public class AssetNavigateEditor : EditorWindow { [MenuItem("Window/MyTools/Prefab Open History", false, 1)] st 阅读全文
posted @ 2022-03-24 23:15 yanghui01 阅读(144) 评论(0) 推荐(0)
摘要: # 需要服务器返回当前页和总页数 local Pager = {} Pager.__index = Pager function Pager.new() local obj = {} setmetatable(obj, Pager) obj:ctor() return obj end functio 阅读全文
posted @ 2022-03-23 23:56 yanghui01 阅读(46) 评论(0) 推荐(0)
摘要: # 效果图 using System; using System.Reflection; using UnityEditor; using UnityEngine; #if UNITY_2019_1_OR_NEWER using UnityEngine.UIElements; #else using 阅读全文
posted @ 2022-03-23 23:02 yanghui01 阅读(988) 评论(0) 推荐(0)
摘要: # 展示TreeView的窗口 class SimpleTreeView2Window : EditorWindow { [MenuItem("TreeView Examples/Simple Tree View Window2")] static void ShowWindow() { var w 阅读全文
posted @ 2022-03-23 22:24 yanghui01 阅读(431) 评论(0) 推荐(0)
摘要: # 展示TreeView的窗口 class SimpleTreeViewWindow : EditorWindow { [MenuItem("TreeView Examples/Simple Tree View Window")] static void ShowWindow() { var win 阅读全文
posted @ 2022-03-23 21:44 yanghui01 阅读(257) 评论(0) 推荐(0)
摘要: 自己跟自己排序的时候要返回false, 否则排序会不对 table.sort(arr, function(a, b) if a == b then return false end --其它排序逻辑 end) 阅读全文
posted @ 2022-03-23 21:31 yanghui01 阅读(136) 评论(0) 推荐(0)
摘要: # 展示表格的窗口 class TableViewWindow : EditorWindow { [MenuItem("TreeView Examples/Table View Window")] static void ShowWindow() { var window = GetWindow<T 阅读全文
posted @ 2022-03-23 21:23 yanghui01 阅读(802) 评论(0) 推荐(0)
摘要: # 在table的基础上做了轻量级封装,可以获取到元素数量,如果用table,需要每次遍历所有k,v才行 local map = {} map.__cname = "util.map" local null = {} map.null = null map.__newindex = function 阅读全文
posted @ 2022-03-20 21:28 yanghui01 阅读(81) 评论(0) 推荐(0)
摘要: # LRU: Least recently used,最近最少使用 【一般使用链表+map这两个数据结构来实现】 # 使用map来加快缓存数据的查找 # 使用链表来记录最近的访问情况,最近被访问了(Get和Put都属于是最近访问了),就会被移到链表头 # 当Put进去的数据超过缓存容量时,链表尾部的 阅读全文
posted @ 2022-03-19 01:00 yanghui01 阅读(113) 评论(0) 推荐(0)
摘要: # 归并排序也属于一种分治算法 1 local function _mergeArray(arr, first, mid, last, tempArr) 2 local i = first 3 local i_end = mid 4 5 local j = mid + 1 6 local j_end 阅读全文
posted @ 2022-03-18 00:01 yanghui01 阅读(43) 评论(0) 推荐(0)
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 48 下一页