Files
Cielonos/Assets/External VFXs/Hovl Studio/HSFiles/Scripts/HS_CallBackParent.cs
SoulliesOfficial 39b43680a9 爆更
2026-07-18 03:16:20 -04:00

25 lines
669 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Hovl
{
public class HS_CallBackParent : MonoBehaviour
{
[SerializeField] protected Transform parentObject;
//Particle system must have "Stop action - Callback" enabled for normal work.
protected virtual void OnParticleSystemStopped()
{
if (parentObject != null)
{
transform.parent = parentObject;
transform.localPosition = Vector3.zero;
transform.localEulerAngles = Vector3.zero;
}
else
Destroy(gameObject);
}
}
}