Answer the question
In order to leave comments, you need to log in
How to call a method that will turn on and off every few seconds?
Hello, I want to enable and disable the method every few seconds, namely: I want the platforms to be disabled 5 seconds after the game starts. Also, after 5 seconds, these platforms turned on, and so on throughout the level. I did the shutdown of the platform itself, now I need to add to this script the time after which the platforms will become active and inactive. Here is the script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class activeplatform : MonoBehaviour
{
private void Update()
{
if (gameObject.CompareTag("deletegr")) gameObject.SetActive(false);
}
}
Answer the question
In order to leave comments, you need to log in
Kurutin to help you, I will not throw links as it is very easy to find a description on them
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question