Okay I am practically done with the space shooter but when I go to build the game I run into several problems. First it freezes up when nearly finished and for some reason even when I choose the builds folder I made it says the path doesnt exist any ideas how to fix it?
What sort of build are you making? What platform are you running on? Please post a screen shot of the error.
I was following the tutorial best I can and I doing a build based off WebGL and am running Unity on Windows 10. When I hit build the save dialogue box comes up but rather than save the button says select folder. When I try entering a name for my build it says path does not exist.
On another note I found that the whole time I was working in the Scene labeled Done_Main rather than just Main. It hasnt been too difficult to correct the problem . The only difference is that I changed Done_PlayerController to just PlayerController and just needed to reapply the components and everything seems to work just fine yet when I go to test for some reason my ship insists on going straight to the left and sticking there. I can move up and down but I cannot go to the right. I cant seem to find anything wrong in my player controller script
here it is by the way
using UnityEngine;
using System.Collections;
[System.Serializable]
public class Boundary
{
public float xMin, xMax, zMin, zMax;
}
public class PlayerController : MonoBehaviour
{
public float speed;
public float tilt;
public Done_Boundary boundary;
public GameObject shot;
public Transform shotSpawn;
public float fireRate;
private float nextFire;
void Update ()
{
if (Input.GetButton ("Fire1") && Time.time > nextFire)
{
nextFire = Time.time + fireRate;
// GameObject clone =
Instantiate(shot, shotSpawn.position, shotSpawn.rotation);// as GameObject;
}
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
GetComponent<Rigidbody>().velocity = movement * speed;
GetComponent<Rigidbody> ().position = new Vector3
(
Mathf.Clamp (GetComponent<Rigidbody>().position.x, boundary.xMin, boundary.xMax),
0.0f,
Mathf.Clamp (GetComponent<Rigidbody>().position.z, boundary.zMin, boundary.zMax)
);
GetComponent<Rigidbody>().rotation = Quaternion.Euler (0.0f, 0.0f, GetComponent<Rigidbody>().velocity.x * -tilt);
}
}
To be honest I actually have two PlayerController scripts one is the Done_version the other is just PlayerController