void Start() { spawnController = FindObjectOfType <SpawnController> (); spawnController1 = FindObjectOfType <SpawnController1> (); spawnController2 = FindObjectOfType <SpawnController2> (); spawnController3 = FindObjectOfType <SpawnController3> (); }
// Update is called once per frame void FixedUpdate() { transform.position += new Vector3(Speed, 0, 0); GameObject s1 = GameObject.FindWithTag("spawner1"); sc = s1.GetComponent <SpawnController1>(); }
// Update is called once per frame void FixedUpdate() { transform.position += new Vector3(Speed,0,0); GameObject s1 = GameObject.FindWithTag("spawner1"); sc = s1.GetComponent<SpawnController1>(); }