Search Unity

PrefabUtility.GetPrefabAssetPathOfNearestInstanceRoot error

Discussion in 'Prefabs' started by zhuxianzhi, Apr 7, 2020.

  1. zhuxianzhi

    zhuxianzhi

    Joined:
    Mar 30, 2015
    Posts:
    122
    In 2018.3, drag the prefab into the scene, use PrefabUtility.GetPrefabAssetPathOfNearestInstanceRoot to get the prefab path correctly, in 2019.3 it is null.
     
  2. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    We'll need a bug report with repro project and repro steps to be able to look into this. We use this method as part of the Unity editor itself, where it still works as expected, so if something broke it's under specific circumstances, and we need to know what those are.