GameObject.Find
代码演示:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObjectFind : MonoBehaviour {
private GameObject thing;
void Start () {
thing = GameObject.Find("C4");
thing.name = "thing";
}
}
---------------------