Search Unity

Looped actions inside one frame.

Discussion in 'Entity Component System' started by illinar, Feb 6, 2019.

  1. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    I have a Level entity and LevelButton entities with level thumbnails.

    Say I have 8 levels, so I need to load my level 8 times in one frame and get the thumbnail render textures back and assign them to buttons.

    Level loading is done by a system or multiple systems though.

    How would I do something like that without breaking ECS pattern? Manually calling systems in a loop inside level thumbnail generating system? I'm using hybrid ECS with Injection here.
     
    Last edited: Feb 6, 2019
  2. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    You can manually invoke the system 8 times. Or, a better way in my opinion, configure another system to do that for you.
     
    illinar likes this.