Search Unity

Instantiating an entity inside of an instantiated entity

Discussion in 'Entity Component System' started by merpheus, May 14, 2019.

  1. merpheus

    merpheus

    Joined:
    Mar 5, 2013
    Posts:
    202
    Hey there, I have a bullet entity that collides with stuff, when that happens; I am instantiating an explosion prefab. I do that with accessing to CommandBuffer. The problem is, a new entity gets created but it doesn't have any component.I mean any component. Not even LocalToWorld&stuff.

    If I do the same thing on an bullet entity that exists in scene(not instantiated), it nicely instantiates that explosion prefab. Idk what is wrong here.

    Bullet prefab also instantiated by CommandBuffer by another system&job.

    Addition:
    Also when I destroy an entity, its mesh stays in scene but not anywhere on burst inspector, it looks like destroyed but its model still rendered, it feels like a bug.
     
    Last edited: May 14, 2019