Hello there!
So just to say it in beforehand. I have no idea how to code. But I need answers! I am following a tutorial online on how to make a game in Unity. I follow the steps but when I try to play there's this error: error CS8025: Parsing error
This is the script:
using UnityEngine;
[RequireComponent(typeof(PlatformerCharacter2D))]
public class Platformer2DUserControl : MonoBehaviour
{
private PlatformerCharacter2D character;
private bool jump;
void Awake()
{
character = GetComponent<PlatformerCharacter2D>();
}
void Update ()
{
// Read the jump input in Update so button presses aren't missed.
if (Input.GetButtonDown("Jump")) jump = true;
}
void FixedUpdate()
{
// Read the inputs.
bool crouch = Input.GetKey(KeyCode.LeftControl);
float h = Input.GetAxis("Horizontal");
// Pass all parameters to the character control script.
character.Move( h, crouch , jump );
// Reset the jump input once it has been used.
jump = false;
}
}
}
I know that there is just a little Bracket or something that's missing. Please help!
P.S I have NO IDEA where to put this in a catagory so forgive me if this is wrong.
So just to say it in beforehand. I have no idea how to code. But I need answers! I am following a tutorial online on how to make a game in Unity. I follow the steps but when I try to play there's this error: error CS8025: Parsing error
This is the script:
using UnityEngine;
[RequireComponent(typeof(PlatformerCharacter2D))]
public class Platformer2DUserControl : MonoBehaviour
{
private PlatformerCharacter2D character;
private bool jump;
void Awake()
{
character = GetComponent<PlatformerCharacter2D>();
}
void Update ()
{
// Read the jump input in Update so button presses aren't missed.
if (Input.GetButtonDown("Jump")) jump = true;
}
void FixedUpdate()
{
// Read the inputs.
bool crouch = Input.GetKey(KeyCode.LeftControl);
float h = Input.GetAxis("Horizontal");
// Pass all parameters to the character control script.
character.Move( h, crouch , jump );
// Reset the jump input once it has been used.
jump = false;
}
}
}
I know that there is just a little Bracket or something that's missing. Please help!
P.S I have NO IDEA where to put this in a catagory so forgive me if this is wrong.