上一页 1 ··· 55 56 57 58 59
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UICollor : MonoBehaviour { public Ga 阅读全文
posted @ 2022-01-20 12:58 多见多闻 阅读(284) 评论(0) 推荐(0)
摘要: 1、Event Function:事件函数 Reset() :被附加脚本时、在游戏物体的组件上按Reset时会触发该事件函数 Start() :在游戏初始化时会执行一次 Update() :每一帧都会运行这个方法 FixedUpdate(): 会在指定帧调用该方法多少次 LateUpdate():  阅读全文
posted @ 2022-01-20 12:56 多见多闻 阅读(1556) 评论(0) 推荐(1)
摘要: 项目场景: 项目场景中,须要动态添加一个Prefab,可是该预制体的位置和咱们预设的不一致。 问题描述: 须要注意预制体Transfom应该如何设置,通常状况下的逻辑是: GameObject effect = Instantiate(Resources.Load("Text/Window")) a 阅读全文
posted @ 2022-01-20 12:49 多见多闻 阅读(1695) 评论(0) 推荐(0)
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using System.IO; public class Tool { static Dictiona 阅读全文
posted @ 2022-01-20 11:02 多见多闻 阅读(1156) 评论(0) 推荐(0)
摘要: 问题做Unity开发时,经常需要写一些Editor代码,用来提高开发的效率,常见的一种情况就是通过代码修改场景里Prefab的参数。一般修改后会发现一切如期望般正常,但一旦你重启Unity,或者重新加载Scene,那么就会惊喜地发现,之前做出的修改都没有生效。由于我习惯使用新版的Unity,所以下面 阅读全文
posted @ 2022-01-20 11:01 多见多闻 阅读(2077) 评论(0) 推荐(0)
摘要: // 在菜单来创建 选项 , 点击该选项执行搜索代码 [MenuItem("Assets/CheckPrefabAnchor修改预制体锚点", false, 10)] static void CheckPrefabAnchor() { int num = 0; GameObject[] gameOb 阅读全文
posted @ 2022-01-20 10:54 多见多闻 阅读(506) 评论(0) 推荐(0)
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class LoadCube : MonoBehaviour { // Use this for initialization 阅读全文
posted @ 2022-01-20 09:16 多见多闻 阅读(591) 评论(0) 推荐(0)
摘要: using UnityEngine; public class TestPrefabs : MonoBehaviour { public GameObject cubeObject; //void Start() //{ // Instantiate(cubeObject, transform.po 阅读全文
posted @ 2022-01-20 09:14 多见多闻 阅读(377) 评论(0) 推荐(0)
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class LookAtMainCamera : MonoBehaviour { // Use this for initial 阅读全文
posted @ 2022-01-20 09:12 多见多闻 阅读(804) 评论(0) 推荐(0)
上一页 1 ··· 55 56 57 58 59