Unity says it is my script because other games do build except the one i’m currently working on. All the script does is check a input axis is pressed and then will instantiate a prefab that has a rigidbody controller than use the addforce method to push/shoot it. It builds on PC but not Android? Why? Please I need help.
what does the error say?
also did you keep in mind that none of the input axis exist on android? (ie you might want to use #if !UNITY_ANDROID #endif surounding for your non android code)
that’s how dreamora said, Input.GetAxis doesn’t exist for the android/iOS platform. The only inputs you can use are either the hw keys or the touches
or the acceleration, don’t forget that part
but WASD worked. The key input works… hold on let me get the exact code line that has the error (by the way I AM pretty new to Unity, and well especially to Android in Unity)
This is the line:
var instbullet = Instantiate(bullet, transform.position, Quaternion.identity);
instbullet.rigidbody.AddForce((transform.right * -shootforce));
actually… could it be that the project was created on a different computer than the one I am trying to build for on Android? One error says the rigidbody component wasn’t on, but it is.