Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Official Editor tool to replace Gameobjects with Prefabs

Discussion in 'Open Projects' started by Danyang8, Nov 10, 2020.

  1. Danyang8

    Danyang8

    Joined:
    Feb 10, 2018
    Posts:
    1
  2. vishwah13

    vishwah13

    Joined:
    Jun 22, 2019
    Posts:
    4
  3. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
  4. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    288
    I've made a "Replace" context-menu with a searchable popup:
    https://github.com/UnityTechnologies/open-project-1/pull/223

    Here's all the issues I found with the tool:
    - Losed Prefab connections
    - Error when trying to replace prefabs children
    - Missing selection on new objects
    - Added (Clone) to the name
    - Incorrect sibling index
     
  5. jandd661

    jandd661

    Joined:
    Jun 25, 2017
    Posts:
    23
    I also created a tool that works a little differently. This tool searches the scene for prefabs that derived from the selected prefab from the project view. Provides a preview of these objects and notifies the user when targeted scene objects have non-prefab child objects. Provides options to match target scale and rotation. Provides undo.

    This tool differs from the other(s) as it searches for scene objects that derived from the selected prefab in the Project View. Not by selection in the Scene View.

    PR:
    https://github.com/UnityTechnologies/open-project-1/pull/226
    Card:
    https://open.codecks.io/unity-open-...itor-tool-to-replace-gameobjects-with-prefabs
    Demo:
     
    MEMOMEM and Silentor666 like this.
  6. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    288
    So the overall idea is "Prefab Derivatives Search"? If so, this might be useful, but the tool is waay overcomplicated.

    I think it just needs to be "Select Derivatives" in context-menu without Replacing.
    This way our tools could work in harmony, and users might do something else on selected objects :D