S
S
sbuw2022-03-11 18:28:07
Unity
sbuw, 2022-03-11 18:28:07

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());
            }
        }
    }


Grenade Shot:
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

1 answer(s)
G
GFX Data, 2022-03-12
@ShockWave2048

1) Make the assembly visible, check it in it
2) Connect the ADB interface (there is a package for the Logcat unit), see what errors the application throws at startup

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question