20 lines
339 B
C#
Raw Permalink Normal View History

2021-12-21 09:40:39 +08:00
using UnityEngine;
using System.Collections;
public class Delay : MonoBehaviour {
public float delayTime = 1.0f;
// Use this for initialization
void Start () {
gameObject.SetActiveRecursively(false);
Invoke("DelayFunc", delayTime);
}
void DelayFunc()
{
gameObject.SetActiveRecursively(true);
}
}