【3Dゲームエンジン】Unity質問スレッド28at GAMEDEV【3Dゲームエンジン】Unity質問スレッド28 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト35:名前は開発中のものです。 17/01/13 00:40:24.44 XQNNmksd.net using UnityEngine; using System.Collections; public class Test2 : MonoBehaviour { public GameObject a; float delta; void update() { float before = delta; float after = delta + Time.deltaTime; delta += Time.deltaTime; if (before < 3.05f && 3.05f < after) { Instantiate(a, gameObject.transform.position, Quaternion.identity); } } } こんな感じでしょうか? ダメっぽいです、ひょっとしたらUnity側で何かしくじってるのかもしれません…色々探してみます 36:名前は開発中のものです。 17/01/13 00:48:44.36 2cQ+7wxA.net 3.05秒過ぎた後最初のフレームで1度だけ実行ならコルーチン使えよと void Start() { StartCoroutine(Example()); } IEnumerator Example() { yield return new WaitForSeconds(3.05f); Instantiate(a, gameObject.transform.position, Quaternion.identity); } 37:名前は開発中のものです。 17/01/13 00:51:30.09 2cQ+7wxA.net 少なくとも>>33-35はupdate()は呼ばれることはないから動くはずがない 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch