void Shoot() { GameObject bulletGO = (GameObject)Instantiate(bullet_prefab, spawn_point.position, spawn_point.rotation); bullet bullet_script = bulletGO.GetComponent <bullet>(); if (bullet_script != null) { bullet_script.Chase(target); } }