[過去ログ]
【ゲームエンジン】Unity初心者質問スレBuild1 (1002レス)
【ゲームエンジン】Unity初心者質問スレBuild1 http://mevius.5ch.net/test/read.cgi/gamedev/1528249519/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
135: 名前は開発中のものです。 [] 2018/07/03(火) 18:43:10.13 ID:DgOGkLki で、>>134を while (true) { // 子要素を全て取得する for (int i = 0; i < transform.childCount; i++) { Transform shotPosition = transform.GetChild(i); if(title.activeSelf == false){ // ShotPositionの位置/角度で弾を撃つ spaceship.Shot(shotPosition); } } // shotDelay秒待つ yield return new WaitForSeconds(spaceship.shotDelay); } と書き加えました。 もちろん、 // タイトルオブジェクトを取得 private GameObject title; // Titleゲームオブジェクトを検索し取得する title = GameObject.Find("Title"); をクラス内に記載もしました。 そしたら、敵がゲーム中も一切弾を撃たなくなりました。 エラー文は NullReferenceException: Object reference not set to an instance of an object Enemy+<Start>c__Iterator0.MoveNext () (at Assets/Scripts/Enemy.cs:46) UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Coroutines.cs:17) です。 http://mevius.5ch.net/test/read.cgi/gamedev/1528249519/135
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 867 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.009s