上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 48 下一页
摘要: # Transform的默认编辑器类名不叫TransformEditor,而是叫TransformInspector。除了这个,其他基本和CustomRectTransformEditor类似 #if UNITY_EDITOR using System.Collections.Generic; us 阅读全文
posted @ 2022-06-15 23:26 yanghui01 阅读(215) 评论(0) 推荐(0)
摘要: # public class ExportNavMesh { [MenuItem("Tool/Export NavMesh")] public static void Export() { var navMeshTriangulation = NavMesh.CalculateTriangulati 阅读全文
posted @ 2022-06-15 00:06 yanghui01 阅读(559) 评论(0) 推荐(0)
摘要: # 自动创建方式,勾上Navigation Static,并把Area设为Not Walkable # 手动创建方式,加一个NavMeshObstacle组件 Shaper:障碍物的形状,有Box和Capsule两种,默认选Box即可 Center:障碍物包围盒的中心点,默认即可 Size:障碍物包 阅读全文
posted @ 2022-06-13 23:38 yanghui01 阅读(347) 评论(0) 推荐(0)
摘要: Unity - Scripting API: NavMesh (unity3d.com) 【Settings相关函数】 NavMesh.GetSettingsByID(agentTypeID);NavMesh.GetSettingsByIndex(0);NavMesh.GetSettingsCoun 阅读全文
posted @ 2022-06-13 22:43 yanghui01 阅读(1006) 评论(0) 推荐(0)
摘要: # 涉及到的类 NavMesh:一个记录可行走区域的数据结构 NavAgent:要移动的物体,可以利用NavMesh提供的数据来规划最佳路线,避开障碍等 # 创建一个基本的场景,紫色,绿色为可行走地面,灰色为不可行走地面,地面均为6x6大小; 黄色的方块为要移动的物体;白色的胶囊是坐标参照物(删掉C 阅读全文
posted @ 2022-06-11 20:13 yanghui01 阅读(622) 评论(0) 推荐(0)
摘要: # 看下面的几个例子, 就知道元素出现nil时,没法正确获得数组的长度,长度是按某种规律来出现的(具体啥规律得熟悉lua源码才能知道) local tblTest5 = { 1, nil, 2, } print(table.getn(tblTest5)) 结果3 local tblTest6 = { 阅读全文
posted @ 2022-06-11 15:55 yanghui01 阅读(362) 评论(0) 推荐(0)
摘要: # 按住ctrl, 在多个位置点击, 就进入批量编辑了 # ctrl+alt+上/下(菜单 -> Selection -> Add Prev/Next Line), 就进入列编辑模式, 同时编辑列内容 阅读全文
posted @ 2022-06-10 22:48 yanghui01 阅读(1434) 评论(0) 推荐(0)
摘要: # 缩进设置, 菜单 -> View -> Indentation 使用4个空格作为缩进 # 换行符格式,菜单 -> View -> Line Endings Windows: \r\n, CR&LF Unix: \n, LF Mac OS 9: \r, CR # 换行宽度 菜单 -> View - 阅读全文
posted @ 2022-06-10 00:22 yanghui01 阅读(1335) 评论(0) 推荐(0)
摘要: 【代码编辑】 # 自动补全:ctrl+space (菜单 -> Edit -> Comment) # 行注释:ctrl+/ # 块注释:ctrl+shift+/ (菜单 -> Edit -> Text) # 新建行(下面):ctrl+enter # 新建行(上面):ctrl+shift+enter 阅读全文
posted @ 2022-06-09 22:59 yanghui01 阅读(1088) 评论(0) 推荐(0)
摘要: 代码 function LeftTime(hour, min, sec) min = min or 0 sec = sec or 0 local dt = os.date("*t", os.time()) local leftSec = 24 * 3600 - dt.hour * 3600 + dt 阅读全文
posted @ 2022-05-14 20:58 yanghui01 阅读(2286) 评论(0) 推荐(0)
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 48 下一页