Search Unity

PrefabInstanceUpdated.prefabInstanceUpdated doesn't work well in 2018.3

Discussion in 'Prefabs' started by jayatubi, Jan 21, 2019.

  1. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    143
    Hi,

    I found the something about
    PrefabInstanceUpdated.prefabInstanceUpdated
    :
    1. If I open a prefab by double click or click `Open Prafab` in the prefab's inspector it will bring me to a new prefab mode edit scene. In this scene view there is a `Save` button on the top. When I finish editing the prefab and click the `Save` button the prefab will be saved but the prefabInstanceUpdated event won't fire.
    2. If I open a new scene and then drag the prefab into the scene to create an instance. After doing some modification to the instance and click `overrides/apply` in the inspector the prefab will be saved as well and the prefabInstanceUpdated event fires.
    I want to do some post process to the prefabs after it saved/applied but there seems to be no event to tell that in the new prefab edit mode. Any advises?
     
  2. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Hi,

    You want to post process the asset or the instances in the scene?
     
  3. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    143
    I just want to do some automatically stuffs, such as check the compnents' properties, after prefab updated or saved.