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 ConvertGameObjectHierarchy being deprecated?

Discussion in 'Entity Component System' started by sstrong, Mar 24, 2021.

  1. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,183
    I recently read the following note from the part 2 of the data design course.

    So, how would I replace runtime prefab conversion with editor code if I don't know which prefabs will be instantiated until runtime?

    Sure, if I have a cube in a trivial example, just place a Convert to Entity component on it. But, in a hybrid situation where prefabs are referenced in scripts, this seems far less obvious.
     
  2. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    786
    I think they plan to deprecated and replace with a faster runtime API. At least that was what I told in a tech support email.

    You can also convert and save a ref for entity prefabs now for later run time use.
     
    Last edited: Mar 24, 2021
  3. beevik_

    beevik_

    Joined:
    Sep 27, 2020
    Posts:
    86
    This works if you have a known, relatively small set of prefabs that you'll be instantiating at runtime. But if you have a huge pool of prefabs, only a small subset of which you wish to instantiate in any given instance of your game, then it's not very practical.