Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

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.