Search Unity

(Case 1088559) Prefabs with references to self do not work and cause errors

Discussion in 'Prefabs' started by Muuuuo, Oct 8, 2018.

  1. Muuuuo

    Muuuuo

    Joined:
    Apr 16, 2015
    Posts:
    57
    Just making a thread to double check this isn't a "feature".

    When you make a prefab and enter prefab editing mode, put a script to some object with a public gameobject field and then drag that same prefab asset you have open to that field, the console spews the following error:

    AssetImporter is referencing an asset from the previous import. This should not happen.
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()


    Additionally when you now exit the prefab editing mode the field you just assigned is empty.

    Prefabs should be able to reference themselves no problem, right? This has deep design implications if this is not supported.
     
    LeonhardP, xeleh and Peter77 like this.
  2. Muuuuo

    Muuuuo

    Joined:
    Apr 16, 2015
    Posts:
    57
    Answering myself: Just got mail that the bug is reproduced and sent to the devs. Therefore I'm assuming this is a bug and not a feature.

    Thanks.
     
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Indeed! Thanks a lot for the report!
    You'll be able to view the current resolution state here in an hour or two:
    https://issuetracker.unity3d.com/product/unity/issues/guid/1088559/