Hello,
i`m beginer in programing or unity, i want to make script for enable and disable back after a few sec for UI button. i founded this script:
using UnityEngine;
using System.Collections;
public class ActiveStateToggler : MonoBehaviour {
public void ToggleActive () {
gameObject.SetActive (!gameObject.activeSelf);
}
}
but this script wil enable with 1 click and disable after i click again.
What i should add into script? WaitForSeconds?
ps: I used Unity 5.2 and i used C#
sorry for bad english.