using System.Collections; using System.Collections.Generic; using UnityEngine; public class GetComponent : MonoBehaviour { public Transform[] transforms; void Start() { transforms = GetComponentsInChildren<Transform>(true); } } GetComponentsInChildr…
在我们做项目的过程中 经常会有预设中出现空的脚本 例如: 导致的原因是因为 脚本的丢失 现在我们来做一个检查工程中有空脚本的预设工具 老规矩直接上代码 放到工程就能用 using UnityEngine; using UnityEditor; using System.IO; using System.Collections.Generic; public class PrefabTool : EditorWindow { [MenuItem("Prefab Tool/Check Missing…
GameObject Note : gameObject 指的是当前挂着的对象. class in UnityEngine / Inherits from:Object Description Base class for all entities in Unity scenes. Note: Many variables in the GameObject class have been removed. To access, for example GameObject.rende…
unity 有时候找路径太麻烦 写了一个自动生成脚本的工具 using System.Collections.Generic; using System.IO; using System.Text; using UnityEditor; using UnityEngine; public class Auto_BuildCode { private static string path_dic = Application.dataPath + "/Code"; private stat…
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A: B: using System; using System.Runtime.CompilerServices; using UnityEngine.Scripting; namespace UnityEngine { /// <summary> /// <para>Behaviours are Components that can be enabled or disabl…