摘要: 1、在UNITY Assets目录下建立Resources目录并把资源放在里面; 2、在挂在的脚本中先加载资源 GameObject obj =Resources.Load<GameObject>("ttt"); 如果放在Resources目录下建的目录下,如在Resources/RRR 则为Gam 阅读全文
posted @ 2022-01-22 20:43 多见多闻 阅读(2468) 评论(0) 推荐(0)
摘要: 2020 2020.1 : https://storage.googleapis.com/localized_docs/zh_CN/2020.1/UnityDocumentation.zip 2019 2019.1 : https://storage.googleapis.com/localized 阅读全文
posted @ 2022-01-22 07:54 多见多闻 阅读(570) 评论(0) 推荐(0)
摘要: 感谢各位一直以来的关注与支持! 我们的公众号Unity3D游戏开发精华教程干货(u3dnotes)从发布第一篇技术干货文章到今天已经差不多3年了,期间不间断更新了技术干货文章560余篇,范畴涵盖使用Unity3D进行游戏、VR/AR/MR等XR开发及应用开发各方面,范围包括:Unity3D各种效果的 阅读全文
posted @ 2022-01-21 15:01 多见多闻 阅读(2794) 评论(0) 推荐(0)
摘要: 1、基本碰撞检测代码function OnCollisionEnter(theCollision : Collision){ if(theCollision.gameObject.name == "Floor"){ Debug.Log("Hit the floor"); }else if(theCo 阅读全文
posted @ 2022-01-21 14:57 多见多闻 阅读(1233) 评论(0) 推荐(0)
摘要: PC端: using UnityEngine; using System.Collections; public class DragRound : MonoBehaviour { public Transform obj; public float speed = 2; private bool 阅读全文
posted @ 2022-01-21 11:22 多见多闻 阅读(80) 评论(0) 推荐(0)
摘要: 一:搜索品牌关键字 支付宝首页顶部搜索“国家政务服务平台、荣耀、海信、小米、伊利、十足、奥妙、顺丰、集渔、携程、东呈、大润发、肯德基、麦当劳、汉堡王、步步高、益禾堂、爱琴海、小米有品、咪咕阅读、万达广场、加油浙江、联合利华、名创优品、威马汽车、良品铺子、宜家家居、曹操出行、元气森林、蜜雪冰城、一点万 阅读全文
posted @ 2022-01-21 09:15 多见多闻 阅读(324) 评论(0) 推荐(0)
摘要: public GameObject A; public GameObject B; void Test() { //B到A的向量 Vector3 V = A.transform.position - B.transform.position; //单位化(长度为1的向量) V = V.normali 阅读全文
posted @ 2022-01-20 16:52 多见多闻 阅读(1234) 评论(0) 推荐(0)
摘要: 最近做的东西需要用圆柱画线,网上找了些,没找到合适的,所以自己简单写了一个。 这个函数只需要输入起始点和终点即可,材质可以自己调整 void DrawLS(GameObject startP, GameObject finalP) { Vector3 rightPosition = (startP. 阅读全文
posted @ 2022-01-20 16:41 多见多闻 阅读(656) 评论(0) 推荐(0)
摘要: 假如要在这两个物体中间画线的话 要做的就是往顶层节点clock上添加组件Line Renderer 添加结束后如图,比较重要的各个属性介绍Cast Shadows 确定线是否投射阴影,是否应从线的一侧或两侧投射阴影,或线是否只投射阴影而不被绘制Positions 这些属性描述了一个指向connec的 阅读全文
posted @ 2022-01-20 16:24 多见多闻 阅读(2424) 评论(0) 推荐(0)
摘要: private LineRenderer line1; //画线 line1 = this.gameObject.AddComponent<LineRenderer>(); //只有设置了材质 setColor才有作用 line1.material = new Material(Shader.Fin 阅读全文
posted @ 2022-01-20 15:37 多见多闻 阅读(3800) 评论(0) 推荐(0)