Question by
Lupinder · Mar 21, 2020 at 06:38 PM ·
unityeditor
How can I Repeat my Script. It is not working after every function happened. Game Object is button.
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Cooldown : MonoBehaviour
{
float timer = 0;
public GameObject Enable_Disable;
public void Enable()
{
Enable_Disable.SetActive(true);
}
public void Disable()
{
Enable_Disable.SetActive(false);
}
void Update()
{
timer = timer + Time.deltaTime;
if (timer > 6)
{
Enable_Disable.SetActive(true);
}
}
}
Comment
Your answer
Follow this Question
Related Questions
Issues with making a climbing script compatible with CharacterController 0 Answers
I cant get the basic FollowPlayer script to go to Main Camera in the hierarchy 0 Answers
I want to exactly put my player where i want it be. 0 Answers
Cant get rid of old unity version 2018.4.22 0 Answers
Could Not Find Importer After Update 0 Answers