Search Unity

Behold, the legendary Unity 5.5 to 5.4 downgrader.

Discussion in 'Editor & General Support' started by DoctorShinobi, Feb 23, 2017.

  1. DoctorShinobi

    DoctorShinobi

    Joined:
    Oct 5, 2012
    Posts:
    219
    Deleted
     
    Last edited: Nov 9, 2020
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hopefully people will just be using version control and never reach this thread.
     
  3. Dave-Carlile

    Dave-Carlile

    Joined:
    Sep 16, 2012
    Posts:
    967
    Thanks for sharing. Hopefully it's a rare need, but nice to know it's available and possible.
     
  4. steinbitglis

    steinbitglis

    Joined:
    Sep 22, 2011
    Posts:
    254
    Hm... our scenes are actually serialized as text, some of them are even 30MB.

    Is there any way to make this tool work on scenes?
     
  5. MykolaDenysenko

    MykolaDenysenko

    Joined:
    Nov 14, 2016
    Posts:
    1
    Thank you for this awesome tool! This downgrader saved my day and a lot of work!
    I did face some problems after downgrade though - it's not only mentioned problems with sprites/textures (i had to apply "Mipmap" and "compression" into import settings for the most of the image files, to fix their look), but i also had problem with Unity's native scripts of "Image" and "Button" on prefabs. Unity could not recognize them, so project was broken because of that.
    But after analyzing prefab's code (compare working prefab code of Image and Button components with not working) i found that "Image" and "Button" components are referencing to wrong guid. So replacing wrong guid code with correct one fixed the problem and that was the last issue with downgrade in my case.
    Hopefully this will be useful for those who will use this tool.
     
    DoctorShinobi likes this.
  6. steinbitglis

    steinbitglis

    Joined:
    Sep 22, 2011
    Posts:
    254
    I had to rewrite the tool to also handle .unity-files.
    I really don't get the argument why not.
     
  7. Acreates

    Acreates

    Joined:
    Dec 12, 2016
    Posts:
    41
    I have to two halves of a project, one in 5.6 the other is in 5.3.4, will this script also work to downgrade 5.6 to 5.3.4?
     
  8. msureda

    msureda

    Joined:
    Feb 11, 2015
    Posts:
    5
    Wow men, this saved me a lot of work. Thanks.
     
  9. steinbitglis

    steinbitglis

    Joined:
    Sep 22, 2011
    Posts:
    254
    Sharing my own changes:

    Changed ...
    Code (CSharp):
    1.  
    2. if (f.EndsWith(".prefab"))
    3.     ConvertFrom55To54(f);
    4.  
    ... to:
    Code (CSharp):
    1.  
    2. if (f.EndsWith(".prefab"))
    3.     ConvertFrom55To54(f);
    4. if (f.EndsWith(".unity"))
    5.     ConvertFrom55To54(f);
    6.  
    Added at the bottom of the loop "called go through each line" ...
    Code (CSharp):
    1. // Text and Image references
    2. if (lines[i].StartsWith("  m_Script: {fileID:")) {
    3.     lines[i] = lines[i].Replace("f70555f144d8491a825f0804e09c671c", "f5f67c52d1564df4a8936ccd202a3bd8");
    4.     continue;
    5. }
    6.  
    Added after ...

    Code (CSharp):
    1.  
    2. // remove empty material
    3. if (lines[i + 14].Contains("- {fileID: 0}"))
    4.     lines.RemoveAt(i + 14);
    5.  
    ...

    Code (CSharp):
    1. if (lines[i + 15].Contains("- {fileID: 0}"))
    2.     lines.RemoveAt(i + 15);
    3.  
    ... this is due to a line break in the guid above, pushing the second material item one spot down.
     
    nickmcvroom and DoctorShinobi like this.
  10. dardamavet

    dardamavet

    Joined:
    Oct 7, 2014
    Posts:
    4
    Thank you for this tool!
    Had to open a 5.5 project I made at home at a lab that have 5.4.
     
  11. jbelmonte

    jbelmonte

    Joined:
    Jan 9, 2015
    Posts:
    5
    Thank you. Note the tool runs fine on OS X, just remove the Console.{Window,Buffer}Width lines.

    Attaching steinbitglis patch as unified diff.
     

    Attached Files:

  12. johnsoncodehk

    johnsoncodehk

    Joined:
    Feb 19, 2016
    Posts:
    14
    I stumbled upon this theme.
    I have dealt with this issue and just recorded my repair script.
     
  13. stechmann

    stechmann

    Joined:
    Feb 24, 2012
    Posts:
    34
    Hello, we are trying to downgrade a project from 2018 to 2017. Prefab structure breaks. Is there perhaps a current version of the converter script that could help us fix it? Thank you