Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Sprites are still rendered when Disabled component is added through code

Discussion in 'Project Tiny' started by Frickinlaser, Aug 14, 2019.

  1. Frickinlaser


    Jan 19, 2014
    I have an entity with several child entities, each with their own Sprite2DRenderer.
    When I add the Disabled component to the entity in the editor, all child entities also gets disabled and the sprites are no longer rendered. This is what I want.
    However, when I add the Disabled component through code, the sprites are still being rendered. All other systems no longer register the entity, so the Disabled component have successfully been added.

    Do anyone have a clue about why this is happening?