[過去ログ]
【ゲームエンジン】Unity初心者質問スレBuild3 (1002レス)
【ゲームエンジン】Unity初心者質問スレBuild3 http://mevius.5ch.net/test/read.cgi/gamedev/1578720539/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
776: 名前は開発中のものです。 [sage] 2020/03/08(日) 17:40:35.63 ID:+9Yp1l0D >>775 いろいろ試してはいるのですがなんかエラー出ますm(__)m そもそも生成自体ちゃんとできてないみたいです どのように記述すればいいのでしょうか・・・? public class sousa : MonoBehaviour { public GameObject obj; // インスペクターでプレハブ接続済み public GameObject [] go=new GameObject[5]; // Start is called before the first frame update void Start() { for (int i = 0; i <= 5; i++) // オブジェクト複数生成 { go[i] = Instantiate(obj); go[i].transform.position = new Vector3(i, 0, 0); } } // Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) //マウスクリックでランダム選択 { Destroy(go[Random.Range(0,5)]); } } } http://mevius.5ch.net/test/read.cgi/gamedev/1578720539/776
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 226 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.013s