上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页
摘要: public class Lesson1 : MonoBehaviour { //切换场景 void Update() { if (Input.GetKeyDown(KeyCode.Space)) { //切换到L1T2 //需要把场景添加到场景列表中 SceneManager.LoadScene( 阅读全文
posted @ 2025-03-17 17:15 cannedmint 阅读(7) 评论(0) 推荐(0)
摘要: public class Lesson1 : MonoBehaviour { //即时模式游戏用户交互界面(IMGUI) //代码驱动的UI系统 //作为程序员的调试工具,创建游戏内调试工具 //为脚本组件创建自定义检视面板 //创建新的编辑器窗口和工具以unity本身(制作内置游戏工具) //不要 阅读全文
posted @ 2025-03-17 15:49 cannedmint 阅读(8) 评论(0) 推荐(0)
摘要: 音频文件的导入 常用格式 wav mp3 ogg aiff/aif 音源 Audio Source Spatial Blend 音频受3D空间的影响程度 音频监听脚本 Audio Listener 代码控制音源播放 public class Lesson20 : MonoBehaviour { Au 阅读全文
posted @ 2025-03-17 15:31 cannedmint 阅读(9) 评论(0) 推荐(0)
摘要: 碰撞产生的必要条件是两个物体都有碰撞器(Collider),至少一个物体有刚体(rigidbody) 有了刚体才会模拟受到力的作用 Mass - 质量 默认为千克 Drag - 阻力 0表示没有阻力 Angular Drag - 扭矩阻力 阻碍旋转的阻力 0表示没有阻力 Is Kinematic - 阅读全文
posted @ 2025-03-17 14:02 cannedmint 阅读(48) 评论(0) 推荐(0)
摘要: Clear Flags skybox 天空盒渲染 - 3D游戏 solid color 纯色填充 - 2D游戏 Depth only - 只画该层,背景透明 Don't Clear - 不移除,覆盖渲染 Culling Mask 选择性渲染部分层级 可以只渲染指定对应层级的对象 Projection 阅读全文
posted @ 2025-03-16 20:33 cannedmint 阅读(13) 评论(0) 推荐(0)
摘要: public class Lesson12 : MonoBehaviour { // Start is called before the first frame update void Start() { #region 静态属性 //获取屏幕分辨率,获取显示器的分辨率 Resolution r 阅读全文
posted @ 2025-03-16 17:54 cannedmint 阅读(12) 评论(0) 推荐(0)
摘要: public class Lesson11 : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once per frame void Upda 阅读全文
posted @ 2025-03-16 17:25 cannedmint 阅读(22) 评论(0) 推荐(0)
摘要: public class Lesson10 : MonoBehaviour { // Start is called before the first frame update void Start() { #region 世界坐标转本地坐标 //世界坐标系的点转换为本地坐标系的点 //受物体本身缩 阅读全文
posted @ 2025-03-16 16:01 cannedmint 阅读(9) 评论(0) 推荐(0)
摘要: public class Lesson9 : MonoBehaviour { public Transform son; // Start is called before the first frame update void Start() { #region 获取和设置父对象 //获取父对象 阅读全文
posted @ 2025-03-16 10:40 cannedmint 阅读(40) 评论(0) 推荐(0)
摘要: public class Lesson8 : MonoBehaviour { public Transform lookAtObj; // Start is called before the first frame update void Start() { #region 缩放 //相对世界坐标 阅读全文
posted @ 2025-03-16 09:54 cannedmint 阅读(6) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页