Search Unity

Subscene bs

Discussion in 'Entity Component System' started by aveakrause, Mar 8, 2020.

  1. aveakrause

    aveakrause

    Joined:
    Oct 3, 2018
    Posts:
    70
    Is there STILL no way to force reload all the cached data of a subscene? I can't make any changes to my prefabs without the subscene just NOT applying the new component data when closed. It forces me to constantly recreate my subscenes which is a ton of work.

    Then sometimes entities within a subscene display in scene view but not in game view.
    Then sometimes entities within a subscene become REAAAAALLLLLLLLYYYYYYYY big and WAYYYY off position ONLY in playmode.

    Just all around this workflow is so buggy.
     
    filod, mattdymott and artplayer like this.
  2. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    same problem in 0.7.0 + 2019.3.2/2019.3.4, any workarounds would be appreciated. (DOTS sample suffer from this too)
     
    Last edited: Mar 12, 2020
  3. siggigg

    siggigg

    Joined:
    Apr 11, 2018
    Posts:
    247
    Are you only changing data, or you mean also when you change component layout?
    Have you been using the ConverterVersion attribute to trigger re-conversion when you change your component data?
     
  4. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    only changing prefab data, but reference it in a PrefabAssetRegistry like DOTS Sample did, btw, how to use ConverterVersion with IConvertGameObjectToEntity ?
     
  5. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    ok, ConverterVersion attribute seems also can be attach to a IConvertGameObjectToEntity, the downside is that it need to recompile&reload whole project & also trigger a full conversion, it's not ideal when tuning gameplay, sad
     
  6. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Sub scene flow is optimized around a specific use case. If yours varies you just have to adapt the core approach to something that fits better. If you need it now waiting for them to optimize sub scenes for more use cases you will probably be waiting a while.

    For us everything is mostly dynamic, so we have an ECSPrefab abstraction using a ScriptableObject per prefab. where we wrap ConvertGameObjectHierarchy with create a world convert serialize world using binary serialization. So a world per prefab saved to it's own file. Conversion is fast and on demand. Fits dynamic instantiation flows far better. We also have a notion of the prefab asset registry thing.
     
    PublicEnumE likes this.
  7. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    i guess DOTSSample which made by unity themself SHOULD be the "specific use case", also Auto Conversion does happen sometimes, so i believe that's a bug.