标签:soft object eric col -- 第一个 i++ tar system
代码演示:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FindObjectOfType : MonoBehaviour {
private GameObject[] things;
private GameObject thing;
void Start () {
things = FindObjectsOfType<GameObject>();
thing = FindObjectOfType<GameObject>();
Debug.Log("第一个" + thing.name);
for(int i = 0; i < things.Length; i++)
{
Debug.Log(things[i].name);
}
}
}
---------------------
标签:soft object eric col -- 第一个 i++ tar system
原文地址:https://www.cnblogs.com/liyanyan665/p/11278032.html