I created for my FPS game a script for bullits.
var bullitPrefab:Transform;
function Update () {
if(Input.GetButtonDown("Jump"))
{
var bullit = Instantiate(bullitPrefab, GameObject.Find("spawnPoint").transform.position, Quaternion.identity);
bullitPrefab.rigidbody.AddForce(Transform.forward * 200);
}
}
But there is one problem if i run the game in unity it sets: All compiler errors have to be fixed before enter playmode.
What does this mean?
I tried this:
All bullit rename to arrow because my bullit is named Arrow
That doesnt work
Then i did all rename back to bullit and rename the arrow to bullit.
How do i fix this?