Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to load baked Entity prefab or scene/subscene in build through DLC?

Discussion in 'Entity Component System' started by threeplus, Jun 15, 2023.

  1. threeplus

    threeplus

    Joined:
    May 23, 2013
    Posts:
    2
    What I Want to Do:

    I am using Entity 1.0 and want to update game content, such as weapon skins or stages, through DLC/patches. These data should not be included in the original build.


    The Problem:

    For years, clients have downloaded prefab by asset bundles in my game. However, in my new project using Entity 1.0, contents are converted to entities, making it hard to achieve similar results. Prefab or subscene are not baked in asset bundle or addressable, leading to errors about not finding entity file headers during loading. (Building Asset bundle or Addressable does not trigger baking in subscene.)

    I have tried EntitySceneReference and WeakObjectSceneReference, which work in editor but not in client build. It only works if I put the scene in the scene list in the build configuration, but I don't want to include all DLC in the build.

    I have also tried Entity Content management and followed the manual. (https://docs.unity3d.com/Packages/com.unity.entities@1.0/manual/content-management.html). It does trigger baking in the related scene when publishing Content Update. However when I load the scene after downloading contents, it shows an error of Invalid scene id or entity header file couldn't be resolved. I cannot find any examples of using Entity Content management. The manual is obviously missing lacking usage and not updated.

    Solution Needed:

    1. Build DLC patches with baked Entity
    2. Load baked Entity from DLC patches in build
     
    moatdd, davenirline, Opeth001 and 6 others like this.
  2. JeremyLvChy

    JeremyLvChy

    Joined:
    Jul 23, 2019
    Posts:
    10
    moatdd and yokobe0012 like this.
  3. wenyangzhang1992

    wenyangzhang1992

    Joined:
    Jul 13, 2023
    Posts:
    2
    hello!! can u load it by assetbundle?
     
    yokobe0012 likes this.
  4. yokobe0012

    yokobe0012

    Joined:
    Nov 2, 2021
    Posts:
    9
  5. koonm

    koonm

    Joined:
    Jan 5, 2016
    Posts:
    12