Search Unity

Updating project prefabs from 2018.2 to 2018.3

Discussion in 'Prefabs' started by Liens, Sep 12, 2018.

Thread Status:
Not open for further replies.
  1. Liens

    Liens

    Joined:
    Feb 2, 2012
    Posts:
    41
    As a test I opened a 2018.2 project in 2018.3b and found that all script components on my prefabs had been reset as though I'd gone to each one and used "Reset" from the component's menu.
    Does this mean that the old prefabs are essentially non-compatible with the new prefab workflow or is this a bug?

    Thanks.
     
  2. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,532
    I have no idea but I would have assumed so. Probably best to write some sort of SO container to dump all the properties into and then read back from after updating
     
  3. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    423
    probably a bug. they announced the new prefab workflows as backwards compatible
     
  4. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    No, they're meant to be compatible, but there may still be bugs in certain cases where it fails. Sorry about that. We'd appreciate a bug report with your repro project attached. If you have a copy from it from before you opened it with the beta, that would be ideal.
     
  5. Liens

    Liens

    Joined:
    Feb 2, 2012
    Posts:
    41
    Yeah I backed it up before I did the update test, so it's still fine. However the project is probably over 10GB so I'll try to reproduce it on a new project and send the bug report using that new project instead.
     
    phobos2077 and runevision like this.
  6. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Huh, thanks for reporting sounds pretty dangerous :D
     
    Plains and Xarbrough like this.
  7. adamzl

    adamzl

    Joined:
    Feb 24, 2018
    Posts:
    19
    In a similar vein is migration from 2018.2.0xImproved-Prefabs to 2018.3 supposed to work? I appreciate it is a weird stand alone build of Unity and maybe never supposed to migrate.
     
  8. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    Yes, that's supposed to work.
     
  9. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    I did a copy of the project and opened in 2018.3 to see what happens. In regards to prefabs I'm getting this:
    "
    PPtr cast failed when dereferencing! Casting from PrefabInstance to Prefab!
    "
    As a result on project conversion,
     
  10. douglassophies

    douglassophies

    Joined:
    Jun 17, 2012
    Posts:
    77
  11. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    My prefafs are suffering from the :

    PPtr cast failed when dereferencing! Casting from PrefabInstance to Prefab!

    The players tank fails to instantiate :\ Gonna chedk that other thread and see if I see the light.
     
  12. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    Ok this new prefab workflow is gonna be a bloodbath.

    upload_2018-9-13_0-36-43.png

    You see that? this is an override for a FRESLY drag and droped to the scene prefab.
    All theese photon Views aquire a id value once they appear in scene and that triggers the override....

    upload_2018-9-13_0-38-48.png

    I want the old procedure back already....
     
    micodev and Rich_A like this.
  13. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    "PPtr cast failed when dereferencing! Casting from PrefabInstance to Prefab!"
    does not allow my prefabas to instantiate. so player does not spawn so everything feels broken....
     
  14. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    Ok the dissaster is bigger. As the OP I've prefabs that have lost all references. Just check this UI Prefab

    upload_2018-9-13_1-1-28.png

    RIP
     
    micodev and tmalhassan like this.
  15. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    OK previous was the instantiated prefab, this is how the prefab loosk when selected on project and click open
    upload_2018-9-13_1-3-17.png

    Aside, having to click open is really annoying, it was better befor as it allowed for quick prefab check/edit
     
  16. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    I saved teh scene I had open and now "WORKS" meaning that I've an spawn, but plenty of issues on the console. (this is a working project in 2018.2
     
  17. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    OK, now I get it, when I saved the scene, the prefab was already in the scene, so it may have fixed something. I'm going to try with the players tank same way.
     
  18. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    Definitelly the prefabs are not properly imported, the image on the right is how it looks in 2018.2 on the left how it iw in 2018.3
    upload_2018-9-13_1-18-40.png

    This is an script in a child object of a prefab. and same happens on the root

    upload_2018-9-13_1-20-38.png
     
  19. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
  20. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    I've submited a bug report, will post case number when I get it
    Case 1080570
     
    Last edited: Sep 13, 2018
    runevision and LeonhardP like this.
  21. adamzl

    adamzl

    Joined:
    Feb 24, 2018
    Posts:
    19
    I got a tip in another thread on the solution to migrating from 2018.2.x-ImprovedPrefabs to 2018.3: delete the ProjectSettings > ProjectVersion.txt file
     
  22. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    We have a fix that should hopefully address this on the way.
     
    TokyoWarfareProject likes this.
  23. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    This happened for such Prefabs prior to 2018.3 as well; it's nothing new. You can just easily see an overview of all overrides on the Prefab now, which you couldn't before.
     
  24. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    Ok. good to know this wont break things, the issue is that this will interfere with "real" override messages. Should be an option to add scripts to be ignored such the PhovonViews that assign id's on teh fly.
     
  25. Liens

    Liens

    Joined:
    Feb 2, 2012
    Posts:
    41
    I just went back to the version I had updated to 2018.3b1 and this seems to be the case for me too.

    Going to "Open" on the prefab, this "opened" version has all the correct script variable references. The only way to correct these instantiated versions is to edit the "opened" prefab in some way which must push out the correct script variable info to all the instantiated versions.

    However updating each prefab manually will be a hassle so it's not the greatest solution. Also I have not managed to reproduce this behavior in a test project yet.
     
  26. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    Yes, definitely solution must come from a proper fix that allows proper prefab upgrade.
    in 1h I'll have finish uploading the reproduction project. Hope this helps to finally fix this and allow this to be fixed once for all. Sadly it wont come by beta2, aparently (for reasons I can´t understand) any fix related to this may not come until beta3 or later :\. They may find usefull other projects to double check they've fixed it so may be you could send them a repro project referencing the bug report reference I posted in older post
     
    Last edited: Sep 16, 2018
  27. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    After manually fixing the minimum number of prefabs for the game to launch and "run" I'm finding my fears become true.
    This is hwo it looks in 2018.2 when prefaba is selected
    upload_2018-9-16_21-36-27.png
    As you need to "spawn" the prefab in edit mode it then looks like
    upload_2018-9-16_21-38-15.png

    and I believe the ids are stored int eh prefab causing:
    upload_2018-9-16_21-38-45.png
    When this prefab is instantiated multiple times for player and multiple AI
    edit: in the last image this message is printed 19 times as many as AI

    EDIT: I'm leaving this particular issue on hold as may be a secondary issue caused by the current statusu of the broken imported prefabs.
     
    Last edited: Sep 16, 2018
  28. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    We're looking into this issue. In the mean time, could you let us know if selecting the Prefab Asset and selecting "Reimport" fixes the issue?

    Note: Choosing "Reimport All" does not work (also something we're investigating).
     
  29. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    Hey!,

    tested with a simple prefab and seemed to work, did search all by type and selected all and reimported, and the stuff is working better certainly, there is still plenty of stuff that looks wrong, and is ankward because I see no errs in console.

    dont have time to check in depth now. Yet you people have my entire project delivered to QA team to see it by yourselves. I'll post if I find out somehting new
     
  30. Liens

    Liens

    Joined:
    Feb 2, 2012
    Posts:
    41
    Yes that is correct. I can also confirm that "Reimport" updates the instances, with the same result as my previous post's solution.
     
    tmalhassan and runevision like this.
  31. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    456
    I can confirm after we have fixed our DataPrivacy issue since in 2018.3 it is included in analytics I saw whole project prefab reimport initiated by unity. From that moment all prefabs are ok. We are 2018.3b2
     
    runevision likes this.
  32. aaronflippo

    aaronflippo

    Joined:
    Jun 7, 2012
    Posts:
    36
    I'm still seeing this in 2018.3b10, with a project that I'm upgrading from 2017.3f1.
    That is - fields that look legitmate and correct in the inspector, suddenly become null or empty (in the case of lists) when dragged into a scene or instantiated.

    Doing "reimport" on individual prefabs fixes it.
     
  33. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    Hi. Our existing bug reports on this issue don't reproduce on beta 10. If you're still seeing it in beta 10, we'd appreciate a bug report about it. It might be a good idea to attach a version of the project that's based on 2017.3 and hasn't been touched by 2018.3 so that we can reproduce the initial upgrade of your project on our end. Please post case number here if you go ahead with this, thanks!
     
  34. Huminaboz

    Huminaboz

    Joined:
    Mar 12, 2013
    Posts:
    3
    Ran 2018.3.0f2 and all my scene prefabs are reset. Looks like this thread was talking about the beta, but I'm still seeing it in an official release. Had to revert to a backup with 2018.2.20f1. Did anyone find a solution?
     
  35. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    Odd. That is still happening.

    Have not experienced myseld since. Eta. I use f1 tho. Search by type prefab . select all. Reimport. In project view. This should fix.
     
  36. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    To reiterate: The bug reports we have related to this issue no longer reproduce. Intended behavior is that once all compile errors are fixed, Prefabs in question should reimport automatically and after that appear fine. If you're still seeing Prefabs not getting automatically reimported and you have to reimport them manually, please do file a bug report so we can investigate it, Thanks!
     
  37. kew2001

    kew2001

    Joined:
    Dec 29, 2015
    Posts:
    10
    Just updated from 2018.2.18f1 to 2018.3.0f3

    Prefabs did not display. Most noticably because Scale and positions were set to 0

    Reverted upgrade changes and loaded in 2018.2.18f1 and everything was back to normal.
     
  38. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    284
    Huh. Looks like they have definitelly messed up something again after f1. I use .3f1 without issues.
     
  39. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    Could you file a bug report please? We won't have any way to fix it if we don't know how to reproduce it and we haven't been able to make something like that happen here.
     
  40. KingKRoecks

    KingKRoecks

    Joined:
    Jul 28, 2013
    Posts:
    7
    I have a little workaround, though it's a manual process.

    If you open the Prefab in the Prefab Workflow, you can drag the root object into the source folder. This will ask if it should be the new "Base".
    Say yes.

    The old reference will now be a derived form of the new base, and should work.

    Edit: Nope, not the [Serializable] flag.
     
    Last edited: Jan 14, 2019
  41. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    141
    I hope Unity takes it onboard not to introduce such huge workflow changes (with no means of reverting) in a 20xx.3 release. It should be expected that most studios will be working towards finishing or patching their games onto the LTS release and then often leaving it there, so huge changes like this should be restricted to 20xx.1.

    I know this won't happen but if I were at Unity I would consider reverting the whole prefab change for 2018.4 LTS and working on it properly in 2019.1 onwards, taking all of this feedback into account and doing it properly.

    The big advantage Unity has over Unreal is that things mostly work well and intuitively for non-technical workers. The way that this prefab system has been setup requires such strict discipline and basically waterfall-style constant non-iterative progress that I think it is out of place in games development.
     
    Last edited: Jan 17, 2019
    protopop likes this.
  42. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    This seems off-topic for this thread. I don't know what workflow changes you're referring to that discussed in this thread.

    EDIT: I deleted some further replies that were clearly off-topic for the topic of this thread. Please don't take over and derail random threads with unrelated gripes.
     
    Last edited: Jan 17, 2019
  43. kew2001

    kew2001

    Joined:
    Dec 29, 2015
    Posts:
    10
    Thanks,

    Is there a way I can make a bug report without your system attempting to upload my entire game to you?

    I have resolved the issue manually.

    Various Canvas based UI GameObjects had all RectTransform values set to 0 on upgrade.
     
    Last edited: Jan 20, 2019
  44. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    3,863
    You can remove the project from the bug reporter window. There's a list of files that will be attached, you can add and remove from that list as you see fit.
     
  45. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    222
    Just catch this bug making migration from 2017.4->2018.3. All my prefabs are broken now.
     
    micodev likes this.
  46. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,558
    The original issue reported in this thread was back when the feature was in beta and has since been fixed.
    1. Make sure to use the latest version of Unity 2018.3 (at time of writing it's 2018.3.5)
    2. Make sure to fix all compile errors if you have any and see if that fixes the issue.
    3. If not, try reimporting the Prefabs in question (don't just Reimport All).
    4. If the issue still persists, please file a bug report with repro project and repro steps.
    I'll close this thread since it causes confusion to have an issue back from beta keeping on resurfacing. Feel free to start a new thread if you see the issue with latest Unity and steps 1-3 above don't help.
     
Thread Status:
Not open for further replies.