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

Is SubScene a pure ECS prefab?

Discussion in 'Entity Component System' started by Orimay, Feb 27, 2020.

  1. Orimay

    Orimay

    Joined:
    Nov 16, 2012
    Posts:
    304
    I got an impression, that SubScenne is the only way to store a pre-converted set of data to an ECS representation in order to be able to load it later. I was wondering if there's another way of getting prefabs converted. If not, is it possible to load SubScenes via Addressables? I want to be abe to load and spawn my areas (and some of them duplicate, but have different positions), so they are pretty much like prefabs, but as far as I know, there's no way to have prefabs pre-converted.
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
    You can just serialise them yourself and save them to disk with serialise utility. We do this for a few things, pretty much just mini sub scenes.

    I'm not sure if recommend this if you're writing new code though. This was done because it had to plug into our existing template system.
     
  3. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
  4. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,695