You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 lines
527 B

using System.Collections;
using UnityEngine;
using UnityEngine.VFX;
public class EnableVFXAfter : MonoBehaviour
{
public int frames = 1;
VisualEffect vfxComponent = null;
void Awake()
{
vfxComponent = GetComponent<VisualEffect>();
vfxComponent.enabled = false;
}
// Update is called once per frame
void Update()
{
if (vfxComponent.enabled)
return;
if(Time.frameCount >= frames)
{
vfxComponent.enabled = true;
}
}
}