Search Unity

Question Is it possible to link game object to prefab counterpart?

Discussion in 'Prefabs' started by blablaalb, Sep 13, 2021.

  1. blablaalb

    blablaalb

    Joined:
    Oct 28, 2015
    Posts:
    53
    Let's say I have exactly the same objects hierarchy structure duplicated in several scenes. Something like the following
    Code (csharp):
    1. └── Canvas
    2.     └── Panel
    3.         ├── Image
    4.         ├── Text
    5.         └── Button
    Then I realized that I want to slightly change the structure and I want the change to propagate to all scenes. For example add another button
    Code (csharp):
    1. └── Canvas
    2.     └── Panel
    3.         ├── Image
    4.         ├── Text
    5.         ├── Button
    6.         └── Button 2
    Is it possible to make a prefab from the first scene, link all other objects on other scenes to the prefab and then modify the prefab?
    I want to avoid deleting the game objects hierarchy from the scenes and replacing it with prefab, because it has fields exposed and dependencies are injected through Inspector. I would want to link existing game object to the prefab counterpart with the exactly same structure and then modify the prefab. Is it achievable?
     
    awsapps likes this.
  2. awsapps

    awsapps

    Joined:
    Jun 15, 2021
    Posts:
    74
    Same!
     
  3. Peter_Olsted

    Peter_Olsted

    Unity Technologies

    Joined:
    Apr 19, 2021
    Posts:
    75
    awsapps likes this.