Search Unity

Prefab Variant Missing References and Losing Parent Settings

Discussion in 'Prefabs' started by kwhipke1, Jan 12, 2020.

  1. kwhipke1


    Jan 6, 2020
    Sorry if I'm not doing this through the proper channels, I just wanted to make sure this is brought to the attention of Unity development team. There is an issue marked as "resolved" in the issue tracker but this (or a similar problem) is still affecting quite a few projects other than ours and is eating up a lot of our dev team productivity. I'm not sure if I should create a new bug report for it, people are still adding comments to the issue because it's the first google search result.

    Here's the issue in question:

    Notice many recent comments complaining about prefab references.

    Here's our own ticket for it:

    The issue we are personally having is that, after doing a standalone build (ctrl + shift + b), we see 2 things happening (sometimes only one of them happens):
    1. Scriptable Object assets which reference prefab variants now show as "Missing". We can usually fix this by committing unsaved changes then doing a git reset --hard.
    2. Prefab variant components seem to lose all of their settings. Neither their overridden settings or the settings inherited from the parent show up in editor. We can usually fix this by doing a Reimport on our prefab folder.

    In all cases, if we look at the actual YML of the meta / prefab / assets, it's the same as it is regardless of if we see this issue or not. But when we actually run the game in the editor after seeing this issue, it behaves as if that stuff is missing.

    This only seems to affect prefab variants and references to prefab variants.

    I might be able to work on an actual reproduction so I can submit it but it's going to take some time.

    Edit - oops, forgot to say I am on 2019.2.17f1
    EDIT2 - 2 things to clarify. 1) When we see this issue, the YML of the meta / prefab / assets is the same as when we don't see this issue. 2) Regardless of what we see in the editor, the issue doesn't show up in standalone builds of the game (ctrl + shift + b), it only appears in the editor and when we run the game in the editor.
    Last edited: Jan 12, 2020
  2. runevision


    Unity Technologies

    Nov 28, 2007