Search Unity

Not render a mesh based on its parent

Discussion in 'Graphics for ECS' started by 5argon, Dec 9, 2018.

  1. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    Attach component is a good first step for game object-like behaviour, what I want now is to replicate the "SetActive" of game object. If I attach Disabled component, then all childs should not get drawn in MeshInstanceRendererSystem, for example.

    I believe currently I have to attach Disabled to every little pieces (which had already been linked properly via Attach/Attached/Parent system) to make them disappear together. When one object is composed of multiple mesh instance renderer entities the Disabled attaching command amount is getting very large.

    *I may throw away the parent by moving them far and have dragged its child to be culled together, but ideally I would not like to change its positional component + I would like to also exclude them from being processed by TransformSystem.
     
    Last edited: Dec 9, 2018