cvr-props/Assets/ABI.CCK/Components/CVRBuilderSpawnable.cs

19 lines
400 B
C#
Raw Normal View History

2023-01-22 16:38:23 +01:00
using System;
using UnityEngine;
namespace ABI.CCK.Components
{
public class CVRBuilderSpawnable : MonoBehaviour
{
private void Reset()
{
if (GetComponent<CVRSpawnable>() != null)
{
Invoke("DestroyThis", 0);
}
}
void DestroyThis() {
DestroyImmediate(this);
}
}
}