Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public static class TransformExtensions
- {
- // 直下の子供全削除
- public static void DestroyAllChildren(this Transform self)
- {
- foreach (Transform trans in self) {
- Object.Destroy(trans.gameObject);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement