metahunt/Assets/Scripts/Utils/AutoDisable.cs
2024-02-11 13:53:18 +05:30

19 lines
287 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AutoDisable : MonoBehaviour
{
int t;
private void Update()
{
t++;
if (t > 5)
{
t = 0;
gameObject.SetActive(false);
}
}
}