Search Unity

What is the best way to handle configure data for DOTS?

Discussion in 'Entity Component System' started by lijianfeng, Aug 20, 2019.

  1. lijianfeng

    lijianfeng

    Joined:
    Sep 8, 2015
    Posts:
    54
    I have some configure data come from *.xlsl file ,in my old project, every xlsl file was parsered to dictionary, use struct as the value,and put it in some singleton class,do I need to use the NativeHashmap and the NativeString?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    If you care about performance & load speed then. Then the runtime data should be stored in a blob asset or IComponentData if it can be represented that way for what you need at runtime.

    Simplest approach would be the perform the parsing during game object -> entity scene conversion and output blob data or multiple entity/ icomponentdata representing the data.
     
    bb8_1 and NotaNaN like this.