17 lines
394 B
C#
17 lines
394 B
C#
using UnityEngine;
|
|
|
|
namespace RR.Common.Behaviour
|
|
{
|
|
public class MessagePlaceholder : MonoBehaviour
|
|
{
|
|
|
|
private void Update()
|
|
{
|
|
// Используем childCount вместо GetComponentsInChildren — намного быстрее
|
|
if (transform.childCount == 0)
|
|
{
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
}
|
|
} |