CapersProject/Assets/Hovl Studio/HSFiles/Scripts/HS_CallBackParent.cs

21 lines
503 B
C#
Raw Normal View History

2024-06-14 19:47:01 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HS_CallBackParent : MonoBehaviour
{
[SerializeField]protected Transform parentObject;
protected virtual void OnParticleSystemStopped()
{
if (parentObject != null)
{
transform.parent = parentObject;
transform.localPosition = Vector3.zero;
transform.localEulerAngles = Vector3.zero;
}
else
Destroy(gameObject);
}
}