Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity 2018.3.0b5 ( and b4 ) fileIDs randomly change for entire project

Discussion in '2018.3 Beta' started by JoeGrainger, Oct 11, 2018.

  1. JoeGrainger

    JoeGrainger

    Joined:
    Oct 20, 2012
    Posts:
    19
    So this is super frustrating for me right now, it feels like I'm playing the Weakest Link and I have to keep banking my prefabs/assets.

    Every so often Unity will randomly decide to make up brand new fileIDs for numerous prefabs and suddenly everything has missing references...?

    I've had this happen four times now in a period of 3 or 4 hours and can't seem to pin it down to any particular process of events, is anyone else having this same issue or worked out a way to prevent it/work around it?

    Here is an example in SourceControl of a prefab changing



    Thanks,
    Joe
    :(
     
    trenthm likes this.
  2. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,121
    Do you find it's the same prefabs and the same class fields that get their FileIDs jumbled up? We are dealing with this ourselves, and we have no idea how to reproduce it. I'm glad that you are reporting a similar issue so we are not alone because since I posted about this (big) issue the other week, we haven't seen anyone else complain about it. Felt like we were the ones doing something wrong somehow...

    This issue is claimed to have been fixed in b5, but because we don't know the reproduction steps we can't confirm.. it just "happens sometimes".
     
  3. JoeGrainger

    JoeGrainger

    Joined:
    Oct 20, 2012
    Posts:
    19
    Yes, I also searched for other people suffering the same problem but couldn't see anything online and was wondering if it was only me. It's exact same prefabs and class fields receiving new FileIDs.

    I had a thought that it could be linked to saving a scene whilst in the new isolated edit-prefab scene but I know the last time the prefabs received new FileIDs this was not the case and now I'm really not sure.

    I can confirm the issue has unfortunately occurred in b5 :(
     
  4. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,121
  5. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Hi,

    Objects don't change fileids.

    This usually happens because you have a script that generates objects. What I often is people have a script that will destroy an object and then create a new one of the same type. Doing this will create new fileids.

    I have a strong feeling you are being hit by this. You might not even know about as it could be a script from Asset Store and when you inspect said objects everything looks fine because the objects appear normal when in fact they have been recreated.
     
  6. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,121
    Our script does generate new prefabs. We have an inhouse 'blueprint system' that can generate prefabs from the ground up with some code. Pretend we have a car game, we have a car blueprint, and the car blueprint does something like this:

    1. Delete existing prefabs.
    2. Create a new GO called 'car'
      1. Add a collider/meshrenderer/meshfilter
    3. Create a new GO called 'wheel'
      1. Add collider/meshrenderer/meshfilter to wheel.
      2. Create a new prefab called Wheel
    4. Add Car component to Car GO
    5. Add reference to newly genereted wheel prefab on the Car component
    6. Save Car GO as new prefab.
    And, following this example... 'sometimes' the FileID's of the Wheel prefab will change, and the Car prefab will loose the reference to the Wheel Prefab..

    But it is really strange because (in our case) both the Car prefab and the Wheel prefab were created from scratch at the same time. The Car Prefab always gets regenerated in our case, and it always references the regenerated Wheel prefabs. So, why would the FileID's get changed on the Wheel prefab 'randomly' ? Am I saving the wheel/car prefab incorrectly?
     
  7. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,121
    Here is some psuedo code of what we do:
    Code (CSharp):
    1.     GameObject GenerateCar()
    2.     {
    3.         AssetDatabase.DeleteAsset("Car.prefab");
    4.         AssetDatabase.DeleteAsset("Wheel.prefab");
    5.  
    6.         var carGO = new GameObject("Car");
    7.         carGO.AddComponent<MeshFilter>();
    8.         carGO.AddComponent<MeshRenderer>();
    9.         //etc
    10.  
    11.         var wheelGO = new GameObject("Wheel");
    12.         wheelGO.AddComponent<MeshFilter>();
    13.         wheelGO.AddComponent<MeshRenderer>();
    14.         //etc
    15.  
    16.         var wheelGOPrefab = PrefabUtility.SaveAsPrefabAsset(wheelGO, "Wheel.prefab");
    17.  
    18.         carGO.AddComponent<Car>();
    19.         carGO.WheelPrefabRef = wheelGOPrefab;
    20.  
    21.         return PrefabUtility.SaveAsPrefabAsset(carGO, "Car.prefab");
    22.     }
    This code 'works' (well, maybe not that code since I just wrote it up on the spot, but our own code is pretty much the same). The Car prefab has a valid reference to the Wheel prefab. But 'at some point' the Wheel prefabs FileID's change and the carGO no longer has a reference to the wheel.
     
  8. JoeGrainger

    JoeGrainger

    Joined:
    Oct 20, 2012
    Posts:
    19
    Apologies for the late reply - I'm not actually creating new objects and it seems to only affect specific assets that existed in the project prior to upgrading to 2018.3 ( from 2018.2 ). The problem still persists in 2018.3.0.b6 and I just checked the patch notes for b7 and there is no mention of this.

    I've still not been able to pin down what is causing the fresh IDs but it's super difficult to work with now :(

     
    Prodigga likes this.
  9. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Any chance you can share the project and an easy way to reproduce?
     
  10. JoeGrainger

    JoeGrainger

    Joined:
    Oct 20, 2012
    Posts:
    19
    I'll try and get some reproducible steps tomorrow, whats the best way to share the project?

    Thanks!
     
  11. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,444
    Using the bug reporter tool, as described here:
    https://unity3d.com/unity/beta/guide-to-beta-testing#tab-3

    ... after you submitted the bug report, you will receive a confirmation email with the bug report ID. I recommend to post the id here for unity staff to pick up.
     
    LeonhardP likes this.
  12. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,106
    Any updates on this?
     
    benvenda, trenthm and h41ku like this.