Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

when is the typescript System script run?

Discussion in 'Project Tiny' started by apoorv_baked, Feb 1, 2019.

  1. apoorv_baked

    apoorv_baked

    Joined:
    Feb 1, 2019
    Posts:
    5
    I just cant seem to properly understand when is a system script runs as it is not attached to any entity etc , does it run all the time in the world view , can someone care to explain please
     
  2. abeisgreat

    abeisgreat

    Joined:
    Nov 21, 2016
    Posts:
    44
    Systems are always running, yes. The idea is that you'll place "components" on entities. You can use these components when you call this.world.forEach which will then run for each entity that the system cares about. So by attaching a component you're telling zero or more systems to act on that entity.