Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public static class TransformExtensions
  4. {
  5. // 直下の子供全削除
  6. public static void DestroyAllChildren(this Transform self)
  7. {
  8. foreach (Transform trans in self) {
  9. Object.Destroy(trans.gameObject);
  10. }
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement