CapersProject/Packages/com.distantlands.cozy.core/Runtime/Utility/FXParent.cs

18 lines
319 B
C#
Raw Normal View History

2024-06-03 18:26:03 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace DistantLands.Cozy
{
[ExecuteAlways]
public class FXParent : MonoBehaviour
{
void OnEnable()
{
if (transform.parent == null)
DestroyImmediate(gameObject);
}
}
}