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";

}
}

--------------------- 

posted on 2019-07-31 17:49  激流勇进1  阅读(247)  评论(0编辑  收藏  举报