【3Dゲームエンジン】Unity質問スレッド12
■ このスレッドは過去ログ倉庫に格納されています
0286名前は開発中のものです。
2014/10/04(土) 11:12:33.69ID:DZLWLIpBGameObject.FindからはNULLが帰ってきます
void Update () {
if (Input.GetMouseButton(0)) {
GameObject original = GameObject.Find("Ball");
GameObject o = Instantiate(original, transform.position + new Vector3(0, 1, 0), transform.rotation) as GameObject;
o.GetComponent<Rigidbody>().AddForce(new Vector3(0,10,0));
}
}
■ このスレッドは過去ログ倉庫に格納されています