Search Unity

Question Can't apply Prefab changes

Discussion in 'Editor & General Support' started by getmyisland_dev, Aug 18, 2021.

  1. getmyisland_dev

    getmyisland_dev

    Joined:
    Dec 22, 2020
    Posts:
    100
    I want to apply the changes I made to a prefab and after I click on apply nothing happens and its still there.

    It's a bit hard to explain that's why I made a short video that shows my problem:


    In the video I try to apply changes to a prefab twice and then I change to another gameobject and again try to apply changes twice and it's not working.

    Maybe you encountered this problem yourself and you know a solution, because I see no reason why apply is not working and its really frustrating.

    Thanks in advance,
    Max
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Are the changes you're trying to apply setting references to other objects in the scene perhaps?

    Note that prefabs can't contain references to scene objects, so if that's what your changes consist of, they won't be saved to the prefab.
     
  3. getmyisland_dev

    getmyisland_dev

    Joined:
    Dec 22, 2020
    Posts:
    100
    That is probably the case with a few of them, but in the 2. example of the video I tried to apply transform changes, which should work.
     
  4. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    In your example video I see lots of non-transform changes. Mostly references to other objects on the Camera Manager script. Transform changes don't actually get saved in prefabs anyway AFAIK.
     
    getmyisland_dev likes this.
  5. getmyisland_dev

    getmyisland_dev

    Joined:
    Dec 22, 2020
    Posts:
    100
    Oh yeah I rewatched the video and seems like only button changes were made. I'm gonna do some tests and thanks for the help.