So I have made a clickable object for a tutorial for the game. When you first click it, most objects will disappear. When you click it again, an object will reappear. This is my code so far
using UnityEngine;
using System.Collections;
public class Explain : MonoBehaviour {
public GameObject myevents;
public GameObject friends;
public GameObject chat;
private int clicks = 2;
void OnMouseUp(){
//First click explain news
if (clicks > 1)
{
myevents.SetActive(false);
friends.SetActive(false);
chat.SetActive(false);
clicks = clicks + 1;
}
else (clicks > 2){
myevents.SetActive(true);
}
}
}
At first, it would do both function in a single click, and now it says
Assets/ExplainPhone/Scripts/Explain.cs(21,34): error CS1525: Unexpected symbol `{’
How do I fix this error, and make it so that the else functions only reacts on a second click? I just started working with variables, so please keep it simple