上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 48 下一页
摘要: #if UNITY_EDITOR using UnityEditor; public class MyToggleMenu { const string PrefsKey_IsAutoReloadXxx = "MyToggleMenu.IsAutoReloadXxx"; static int _is 阅读全文
posted @ 2022-03-25 21:49 yanghui01 阅读(55) 评论(0) 推荐(0)
摘要: 【math.random】 math.random() --返回一个[0, 1)之间的浮点数math.random(100) --返回一个[1, 100]间的整数math.random(1, 100) --返回一个[1, 100]间的整数math.random(20, 30) --返回一个[20, 阅读全文
posted @ 2022-03-25 21:37 yanghui01 阅读(228) 评论(0) 推荐(0)
摘要: # 展示最近打开的预制体历史 # 通过左右箭头就能快速打开最近打开过的预制体 public class AssetNavigateEditor : EditorWindow { [MenuItem("Window/MyTools/Prefab Open History", false, 1)] st 阅读全文
posted @ 2022-03-24 23:15 yanghui01 阅读(145) 评论(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 阅读(990) 评论(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 阅读(263) 评论(0) 推荐(0)
摘要: 自己跟自己排序的时候要返回false, 否则排序会不对 table.sort(arr, function(a, b) if a == b then return false end --其它排序逻辑 end) 阅读全文
posted @ 2022-03-23 21:31 yanghui01 阅读(137) 评论(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 阅读(803) 评论(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 阅读(83) 评论(0) 推荐(0)
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 48 下一页