Everything in this code seems to be fine, except that there is a single error in my coding, which is the final curly brace which always gets a red underline… Can anyone help?
{
{
// Read the inputs.
bool crouch = Input.GetKey(KeyCode.LeftControl);
float h = CrossPlatformInputManager.GetAxis(“Horizontal”);
// Pass all parameters to the character control script.
m_Character.Move(h, crouch, m_Jump);
m_Jump = false;
}
if (Input.GetButtonDown(“fire1”))
{
GameObject mBLAST1 = Instantiate(BLAST1, Muzzle.position, Muzzle.rotation);
mBLAST1.transform.parent = GameObject.Find(“GameManager”).transform;
mBLAST1.GetComponent().sortingLayerName = “Character”;
}
}
With more complicated errors this sentence is exactly as meaningless as saying ‘I have an error’. For the future please post the error message as well. Not all errors are so easily solved.