随笔分类 -  Unity3D

摘要:https://blog.csdn.net/leemu0822/article/details/101021441 阅读全文
posted @ 2022-06-23 13:54 小帆敲代码 阅读(10) 评论(0) 推荐(0) 编辑
摘要:函数作为参数去传递 可以参考:https://blog.csdn.net/weixin_45432939/article/details/116014256 阅读全文
posted @ 2022-06-23 12:50 小帆敲代码 阅读(33) 评论(0) 推荐(0) 编辑
摘要:using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class Script_05_09 : MonoBehaviour, IPointerClickHandler, 阅读全文
posted @ 2022-02-22 15:35 小帆敲代码 阅读(41) 评论(0) 推荐(0) 编辑
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; using UnityEngine.EventSystems; public class 阅读全文
posted @ 2022-02-22 14:38 小帆敲代码 阅读(28) 评论(0) 推荐(0) 编辑
摘要:using UnityEngine; using UnityEngine.EventSystems; public class Script_05_06 : MonoBehaviour,IPointerClickHandler { #region IPointerClickHandler imple 阅读全文
posted @ 2022-02-22 13:53 小帆敲代码 阅读(162) 评论(0) 推荐(0) 编辑
摘要:Toggle 设置Toggle Group可以将多个Toggle放在一个组中。 using UnityEngine; using UnityEngine.UI; public class Script_05_01 : MonoBehaviour { public Toggle[] toggles; 阅读全文
posted @ 2022-02-22 11:42 小帆敲代码 阅读(60) 评论(0) 推荐(0) 编辑
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public class WaitTimeManager : MonoBehaviour 阅读全文
posted @ 2022-02-21 17:45 小帆敲代码 阅读(24) 评论(0) 推荐(0) 编辑
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class Script_04_05 : MonoBehaviour { public static Script_04_05 阅读全文
posted @ 2022-02-21 17:12 小帆敲代码 阅读(16) 评论(0) 推荐(0) 编辑
摘要:Unity会同时处理所有的物体:如,先执行所有物体的Awake方法。 阅读全文
posted @ 2022-02-21 16:29 小帆敲代码 阅读(23) 评论(0) 推荐(0) 编辑
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class Script_04_04 : MonoBehaviour { IEnumerator CreateCube() { 阅读全文
posted @ 2022-02-21 15:02 小帆敲代码 阅读(30) 评论(0) 推荐(0) 编辑
摘要:public class Script_04_03 : MonoBehaviour { private void Awake() { Debug.Log("Awake用于初始化并且只会调用一次"); } private void OnEnable() { Debug.Log("OnEnable在脚本 阅读全文
posted @ 2022-02-21 14:47 小帆敲代码 阅读(44) 评论(0) 推荐(0) 编辑
摘要:int layer = LayerMask.NameToLayer("Ground"); //假设=10 LayerMask.GetMask(("Ground"); //相当于 1 << 10 1 << 10 打开第10的层等价于【1 << LayerMask.NameToLayer("Ground 阅读全文
posted @ 2022-01-10 14:10 小帆敲代码 阅读(101) 评论(0) 推荐(0) 编辑
摘要:原文章地址:https://www.jianshu.com/p/86b275da600e 阅读全文
posted @ 2021-11-24 16:25 小帆敲代码 阅读(36) 评论(0) 推荐(0) 编辑
摘要:作用 在类外部也能使用友元函数或友元类 定义 在类1的内部定义friend 类A或friend void fun() 阅读全文
posted @ 2021-10-20 18:03 小帆敲代码 阅读(57) 评论(0) 推荐(0) 编辑
摘要:管道( pipe ) 管道是一种半双工的通信方式,数据只能单向流动,而且只能在具有亲缘关系的进程间使用。进程的亲缘关系通常是指父子进程关系。 有名管道 (named pipe) 有名管道也是半双工的通信方式,但是它允许无亲缘关系进程间的通信。 信号量( semophore ) 信号量是一个计数器,可 阅读全文
posted @ 2021-10-20 17:49 小帆敲代码 阅读(63) 评论(0) 推荐(0) 编辑
摘要:LightMapping 所谓LightMapping,就是把静态光源产生的效果提前渲染成贴图贴到静态物体表面,产生的效果应该和实时计算的结果是一样的,但是因为已经渲染成了贴图(也就是所谓的灯光烘焙),在程序运行期间就免去了实时计算的负担,自然提高了性能。 LightProbe Light Prob 阅读全文
posted @ 2021-10-20 17:48 小帆敲代码 阅读(86) 评论(0) 推荐(0) 编辑
摘要:AABB包围盒 二维碰撞检测 将AABB投影到x\y两个坐标轴判断相交关系 只有两个轴都相交了才算相交 三维碰撞检测 将AABB包围盒投影到x\y\z三个坐标轴判断相交关系 只有三个轴都相交了才算相交 阅读全文
posted @ 2021-10-20 17:36 小帆敲代码 阅读(208) 评论(0) 推荐(0) 编辑
摘要:应用阶段、几何阶段和光栅阶段。 应用阶段 主要是CPU与内存打交道,例如碰撞检测,计算好的数据(顶点坐标、法向量、纹理坐标、纹理)就会通过数据总线传给图形硬件 。 几何阶段(Geometry Stage) 这个阶段也被称为“变换和光照”阶段。为了从3D场景转换到2D,场景中的所有物体都需要转换到几个 阅读全文
posted @ 2021-10-20 15:44 小帆敲代码 阅读(44) 评论(0) 推荐(0) 编辑
摘要:Canvas的渲染模式 Overlay放在所有UI的最前面 Camera放在Camera正前方 World和所有三维物体一样 顺序 不同的Camera的Depth,值越大越后渲染 相同Camera下的不同SortingLayer 相同SortingLayer下的不同Z轴/Order in Layer 阅读全文
posted @ 2021-10-18 18:39 小帆敲代码 阅读(177) 评论(0) 推荐(0) 编辑
摘要:GC是什么 The garbage collector is a common language runtime component that controls the allocation and release of managed memory。 GC是CLR的一个组件,它控制内存的分配与释放 阅读全文
posted @ 2021-10-18 18:01 小帆敲代码 阅读(451) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示