Answer the question
In order to leave comments, you need to log in
After compilation, many things stop working, what should I do?
I am making android fps shooter.
During tests in Unity, everything works stably, damage to enemies passes, grenades get, and so on.
When compiling the game for android, damage to enemies ceases to take place, grenades cannot be thrown.
guns:
private void Update() {
w4 = GameObject.FindGameObjectWithTag("Grenade");
}
public void Attack(){
if(w4 != null){
if(currentAmmo >= 1){
currentAmmo -= 1;
w4.GetComponent<Grenade_Shot>().gren_shot();
}
else{
StartCoroutine(Reload());
}
}
}
public GameObject Grenade;
public void gren_shot(){
Transform Greanade_move = Instantiate(Grenade.transform, gameObject.transform.position + new Vector3(0, 0, 1), Quaternion.identity);
Greanade_move.GetComponent<Rigidbody>().AddForce(transform.forward * 900);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question