14 lines
351 B
C#
14 lines
351 B
C#
using UnityEngine;
|
|
|
|
[ExecuteInEditMode, DisallowMultipleComponent]
|
|
public class PrefabCategoryParent : MonoBehaviour
|
|
{
|
|
public void Update()
|
|
{
|
|
if (gameObject.transform.childCount == 0)
|
|
{
|
|
PrefabManager.PrefabCategories.Remove(gameObject.name);
|
|
GameObject.DestroyImmediate(gameObject);
|
|
}
|
|
}
|
|
} |