I am new to coding with c# in unity and am trying to animate an object in unity, but its saying that I need a semicolon but I cant find where I need one. this is my code
{
public GameObject arm;
public float time = 0f;
public bool timedone = false;
void Update()
{
if(time == 1f)
{
timedone = true;
}
if (Input.GetButtonDown("Fire1"))
{
arm.GetComponent<Animator>().Play("New Animation");
}
else
{
if(!timedone)
{
time += Time.deltaTime;
}
if (timedone)
{
arm.GetComponent<Animator>().Play("New State");
Timereset()
}
}
}
void Timereset()
{
time == 0f;
}
}
if you can help me I would be so grateful
>Solution :
In else condition ,
Timereset() doesn’t have ; there should be Timereset();