Advertisement
Nahuen89

Destruir objetos unity

Aug 12th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.26 KB | None | 0 0
  1. // Funciones unity
  2.  
  3. // funcion para destruir todos los hios de un objeto
  4. public void BorrarTodosHijos(RectTransform  objeto){
  5.         // recibimos un objeto y borramos todos sus hijos
  6.         foreach (Transform child in objeto)
  7.         {
  8.             Destroy(child.gameObject);
  9.         }
  10.    
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement