Search Unity

SubScene : Disable/enable rendering single entities are in a closed Subscene

Discussion in 'Graphics for ECS' started by Quatum1000, Aug 31, 2019.

  1. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi everyone,

    after a SubScene is closed, I'd like to disable/enable single entities of the SubsSene is currently rendering.
    How can I solve this generally?

    Simply, my idea is to add an index number to the entity, that should be disabled or enabled.
    Then using the job system, to find the entity by the index and mark it as 'do not render' or 'render'.

    This is extremely useful to change static objects (in a SubScene) into dynamic none-dots game objects, when the player hits a collider.

    In depth:
    The Dots-SubSceneRenderer does know anything about an additional component/system in the entity-manager to ignore a entity when rendering. Further, an additional condition (if bool do.rendner) is a wrong concept in case of dots and the linear data management.

    Any ideas how to solve the 1) indexing of a entity of the SubScene EntityManager 2) enable/disable a entity by a job?

    Thanks a lot.
     
    Last edited: Sep 1, 2019