// Start is called before the first frame update void Start() { obj = GameObject.Find("Sphere"); // オブジェクトの名前から検索して格納する timer_obj = GameObject.Find("init_obj"); scr = obj.GetComponent <random_pos>(); // スクリプトを取得して格納する getter = timer_obj.GetComponent <instantiate_obj>(); isTrigger = true; }
// Start is called before the first frame update void Start() { obj = GameObject.Find("init_obj"); // 初期化用に用意した空のゲームオブジェクトを検索して格納する script = obj.GetComponent <instantiate_obj>(); // 初期化ゲームオブジェクトのスクリプトを格納する }