随笔分类 - Unity
Unity学习
摘要:1、了解A星寻路是用来解决什么问题的 A*寻路就是用来计算玩家行进路径的,通过它可以计算出避开阻挡的最短路径。 2、了解A*寻路的基本原理 不停的找自己周围的点选出一个新的点作为起点再循环的找 3、A*寻路的详细原理 1)、寻路消耗公式 f = g + h (f:寻路消耗 g:离起点的距离 h:离终
阅读全文
摘要:文件清单概览 每个应用项目必须在项目源设置的根目录中加入AndroidManifest.xml文件(且必须使用此名称)。清单会向Android构建工具、Android操作系统和Google Play描述应用的基本信息。 重点是,清单文件需要声明以下内容: 应用的软件包名称,其通常与代码的命名空间相匹
阅读全文
摘要:应用清单概览: 每个应用项目必须在项目源设置的根目录中加入AndroidManifest.xml文件(且必须使用此名称)清单文件会向Android构建工具、Android操作系统和Google play描述应用的基本信息。 重点是,清单文件需声明以下内容: 应用的软件包名称,其通常与代码的命名空间相
阅读全文
摘要:1.汽车碰撞 2、Sprite图片始终面向屏幕并且和模型的相对位置从视觉上保持一致 首先在初始化的时候:得到摄像机的位置,Sprinte这Vector.up的高度的偏移向量,计算摄像机和和Sprite方向和Sprite的位置的角度,计算出角度的cos只等,当移动的使用计算出新的位置, 其中用到了点到
阅读全文
摘要:问题描述我想实现子元素的布局当子元素的个数减少时,剩下的子UI能够填充父UI的高度。首先在父元素上添加VerticalLayoutGroup并进行如下图的设置: 又在每个子UI上添加LayoutElement并进行如下图的设置: 但是由于上面LayoutElement设置导致在Start()代码中访
阅读全文
摘要:ARKit: https://baike.baidu.com/item/ARKit/9256920?fr=aladdin ARCore:https://baike.baidu.com/item/ARCore/22103194?fr=aladdin Microsoft HoloLens: https:
阅读全文
摘要:adb 命令安装Unity apk遇到问题:adb: failed to install Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl1590213674.tmp/base.apk
阅读全文
摘要:问题: Serialization depth limit 10 exceeded at 'BTFramework::BTNodeData.ChildNodeList'. There may be an object composition cycle in one or more of your
阅读全文
摘要:问题回答链接:https://github.com/playgameservices/play-games-plugin-for-unity/issues/715 public static bool IsPlayServicesAvailable() { const string GoogleAp
阅读全文
摘要:参数:Vector3 point 要旋转的点 Vector3 pivot 中心点 Vector3 euler 旋转的角度 函数:Quaternion.Euler(float x, float y, float z) 返回一个绕Z轴旋转z度、围绕X轴旋转x度、围绕Y轴旋转y度的旋转。另一个重载函数Qu
阅读全文
摘要:Compressed texture icon is used as icon. This might compromise visual quality of the final image. Uncompressed format might be considered as better im
阅读全文
摘要:首先NavMeshAgent组件中的Radius的值指的与Agent最大截屏面直径比例,并不是确切的大小,而 Navgation面版中的Radius值就是真实Unity单位的大小。 Navgation面版中的Agent Radius 和NavMeshAgent组件中的Raius都是指导航代理圆柱的半
阅读全文
摘要:原文地址:https://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html 描述: 指示游戏尝试以指定的帧率进行渲染(渲染帧率)。 默认的targetFrameRate是一个特殊值-1,它指示游戏应以平台的默认帧率进行
阅读全文
摘要:普通跟随: using System.Collections; using UnityEngine; public class FollowCamera : MonoBehaviour { public Transform player; public Vector3 offset; public
阅读全文
摘要:using UnityEngine; using System.Collections; public class CameraFacingBillboard : MonoBehaviour { public Camera m_Camera; //Orient the camera after al
阅读全文
摘要:描述: 允许加载Unity以及重新编译脚本时初始化Editor类. 重新编译项目中的脚本(也称为“域重新加载(Domain Reload)”)时,将调用具有此属性的静态构造函数。在Unity首次加载项目时,以及Unity检测到对脚本的修改(取决于您的“自动刷新(Auto Refresh prefer
阅读全文
摘要:protected void OnCollisionEnter(Collision collision) { if (isCollision) { return; } int layer = collision.gameObject.layer; if (CheckEnableCollision(l
阅读全文
摘要:using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; public class CubeMeshController : Mono
阅读全文
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public enum AnchorPreSet { MIDDLE, TOP, BUTTOM, } [System.Serializable]
阅读全文
摘要:using UnityEngine; using UnityEngine.EventSystems; public class DragThresholdUtil : MonoBehaviour { // Start is called before the first frame update v
阅读全文

浙公网安备 33010602011771号