📅  最后修改于: 2022-03-11 14:49:03.657000             🧑  作者: Mango
public GameObject Object;
void Start()
{
(Object) = GameObject.Find("Object"); // This needs to be the same name as the object you want to reference
}
// Problems you might encounter
// 1. You didn't add the public GameObject
// 2. GameObject.Find isn't in void Start()
// 3. The word in ("") isn't the same name as the Object you want to reference