Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

System Configuration Data

Discussion in 'Entity Component System and C# Job system' started by EvansT, Feb 8, 2019.

  1. EvansT

    EvansT

    Joined:
    Jan 22, 2015
    Posts:
    17
    I'm trying to convert my existing game to use ECS with the hybrid approach. Currently I have a bunch of 'configuration data' in the form of scriptable objects. References to them are assigned directly in monobehaviours that need that data.
    Now that I'll be converting those MonoBehaviours to Systems, how can I access those scriptable objects from the systems? I don't want to make those Scriptable Objects as Singletons. The only option I can think of is to create a few new MBs that have references to the SOs and then access the MBs from the system in order to get to the Scriptable Objects. Is there a better way that I'm missing?
     
  2. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    57
    I like the mb way, but you could also load them on demand/async with Resources and/or Addressables(preview package).
     
  3. EvansT

    EvansT

    Joined:
    Jan 22, 2015
    Posts:
    17
    Thanks. I'm not sure if Addressables will be the right solution for me as the configuration data will change from scene to scene. I will look into it some more.
     
  4. EvansT

    EvansT

    Joined:
    Jan 22, 2015
    Posts:
    17
    Now I have a bunch of single MBs whose only purpose it to either reference a Scriptable Object containing data or directly contain data themselves. Is this the ECS way of handling level-specific data of which there is only a single instance?