Search Unity

[Case 1122658] Prefab variant issue - Need to reimport

Discussion in 'Prefabs' started by aurelien-morel-ubiant, Jan 31, 2019.

  1. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    I'm quite lazy today, so I will just copy paste my issue from my fogbuzz ticket but if you need more I can send anything you want :p

    1. What happened
    One prefab (BulletCard - MenuSummary) variant in another prefab (MenuSummary) doesn't retrieve the good parameters from its variant in the project.
    If we reimport the prefab (BulletCard - MenuSummary) the value came back to its good state.

    2. How we can reproduce it using the example you attached
    - Open project.
    - Search for BulletCard - MenuSummary.prefab and open it with new prefab system.
    You can see the "Normal Color" attribute with alpha set to 1. (which is good).
    - Search for MenuSummary.prefab and open it with new prefab system.
    Find the BulletCard - Menusummary in its hierarchy.
    You can see the "Normal Color" is now setup to "0" (which is not normal).

    Now just use right click on the BulletCard - MenuSummary.prefab and reimport it. And problem is gone.

    This issue happens on any editor / player build when we do a fresh first import on the project. It's a major issue here cause we use a CI pipeline and before each build all the Library is deleted and regenerated.

    Update :
    We have reach a point wwhere we cannot do more than we currently can.
    When you reimport this prefab, we found that you update some metadata file in Library folder but nothing at a prefab state (so nothing can be versionned on our VCS solution (git or whatever the solution used).

    It's truely an annoying bug that totally stuck our automation pipeline build...

    do you know this issue @SteenLund ?
    All our process is broken due to this :/
     
  2. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    If that can help you, we can send you the library folder before the issue and the version after the issue or just the metadata file associated to this issue to center the scope of your research.
     
    Last edited: Feb 1, 2019
  3. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    We finally fix the issue from our side :
    If you reimport the prefab, it will fix the library folder metadata stuff based on the editor variable from what I could deduce which good but not perfect in a CI (Continuous Integration way).

    So after searching a lil bit more, if you edit the variables that are "corrupted" in the prefab by changing their value and saved the prefab after those changes, Unity will saved all the variable that was corrupted first with their new good value.
    After this any Library deletion, prefab reimport was good.

    In our case it was an alpha from a color that wasn't serialized in our prefab file.
    We just open the color selector click slightly at the same place than the picker was. Validate it. Save the prefab and alpha color was setup to 1 again in the prefab file.
    Another thing on those consideration, is it normal to considere a missing alpha entry as a 0 value cause according to me, the default value should be 1, no ?

    If an Unity dev could confirm all my deduction ?!
     
    MNNoxMortem likes this.