15 lines
352 B
C#
15 lines
352 B
C#
using UnityEngine;
|
|
|
|
namespace PashaBibko.PenguinChase.Extensions
|
|
{
|
|
public static class MonoBehaviourExtensions
|
|
{
|
|
public static void DestroyAllChildren(this MonoBehaviour go)
|
|
{
|
|
foreach (Transform child in go.transform)
|
|
{
|
|
Object.Destroy(child.gameObject);
|
|
}
|
|
}
|
|
}
|
|
} |