Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[ECS] How to deal with settings from Monobehaviour to ComponentSystem

Discussion in 'Scripting' started by ewermor, Jan 11, 2020.

  1. ewermor

    ewermor

    Joined:
    Oct 19, 2014
    Posts:
    53
    Hello,

    I'm looking for a way to pass datas from the Editor(MonoBehaviour) to a ComponentSystem. Since World.Active is deprecated, it seems that is only possible to use World.EntityManager in a ComponentSystem then create entities and initialize them from a Spawner ComponentSystem for example.

    Also, I have a lot of global datas as the entities number i want to spawn, and others datas wich the value don't change from an entity to another. I was thinking about something static, maybe a singleton ?

    Thanks for your help !

    Ju