![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
unity操作汇总
Asika_L
这个作者很懒,什么都没留下…
展开
-
Unity基础API详解-GameObject类-获取组件与获取物体
获取组件与获取物体获取物体/寻找物体Find()FindGameObjectsWithTag()未预设报错:空值报错:寻找tag为player的物体数组:FindWithTag()寻找tag为player的物体:获取组件/寻找组件GetComponentGetComponentInChildrenGetComponentInParentGetComponentsGetComponentsInChi...原创 2020-01-21 10:04:33 · 1224 阅读 · 0 评论 -
Unity基础API详解-GameObject类-Message
Message用于物体间发送信息;GameObject.BroadcastMessagepublic void BroadcastMessage(string methodName, object parameter = null, SendMessageOptions options = SendMessageOptions.RequireReceiver);此方法主要用于给本身与子级物体...原创 2020-01-20 09:28:37 · 261 阅读 · 1 评论 -
Unity基础API详解-GameObject类-创建物体
第一种创建方法:GameObject object=new GameObject(“物体名”);如官方文档介绍,GameObject实例化有三种方式public GameObject();-----创建物体,物体名为New Game Object,位置为(0,0,0)public GameObject(string name);-----创建物体,物体名为设定的name,位置为(...原创 2020-01-19 11:38:19 · 2089 阅读 · 0 评论 -
Unity基础API详解-Time类
captureFramerate:设置帧的速率,主要用于截图(只读)deltaTime:当前帧所占用的时间,时间增量(ex:每秒60帧,即deltaTime=1/60),但由于每一帧占用的逻辑不一样,deltaTime的值会上下波动;fixedDeltaTime: 可设置的固定的deltaTime,不会进行波动;(只读)fixedTime:运行总时间,暂停时间不计算(只读)fixed...原创 2020-01-17 14:41:41 · 303 阅读 · 0 评论 -
Uniyt自定义Event在Inspector显示,可添加相应事件
前言在Unity中常常要对操作附加事件,如果在脚本中直接添加事件会十分不方便,很难查询到对应的一些操作事件系统如下图的Button的Click事件代码实现using UnityEngine.Events;public class Voicebutton : MonoBehaviour, IInputClickHandler{ public UnityEvent Follow...原创 2019-05-31 13:47:27 · 1284 阅读 · 0 评论 -
Unity+Hololens学习记录-射线应用
Unity+Hololens学习记录-射线应用前言射线介绍:射线应用元素介绍:RayRaycastHitRaycast射线应用实例:射线碰撞信息获取Camera发出RayGaze射线检测周围物体Hololens部分IFocusableIInputClickHandlerIInputHandlerInteraction Receiver前言最近不断地被要求实现Unity与Holotoolkit上...原创 2019-05-29 11:22:28 · 1662 阅读 · 0 评论