Search Unity

How To Correctly Destroy Entity And All Of Its Children So That It Doesn't Throw Any Errors

Discussion in 'Project Tiny' started by Sladzio, Apr 11, 2019.

  1. Sladzio

    Sladzio

    Joined:
    Apr 15, 2014
    Posts:
    14
    The question as in the topic.
     
  2. reallyhexln

    reallyhexln

    Joined:
    Jun 18, 2018
    Posts:
    69
    Hi, Sladzio.
    I use the following construction:
    Code (JavaScript):
    1.  
    2. ut.Core2D.TransformService.destroyTree(world, entity, true);
    3.  
    I'm not sure, it's the best way to do it, but it works fine for me.