Search Unity

My unity 4 project cannot be rebuild in 5

Discussion in 'Unity 5 Pre-order Beta' started by VisualTech48, Feb 15, 2015.

  1. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    Hi, i cannot load my unity 4 project in 5 because it cannot open the API for some reason. Only visible errors are that the scripts are not working and cannot be loaded.

    Is there any way to fix this?
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    2,845
    Please be more specific, copy-paste the errors. And what do you mean "cannot open the API" ?
     
  3. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    The system that corrects this changes in the UnityJava doesnt want to correct them. Asset / Run api updater.

    To be even more specific:
    I have 276 errors all in my scripts. Not the plugin ones.
    Every time i go Asset/ Run Api Updater the loading circle loads for a 3-5 seconds then vanishes.
    I have heavy Shader issues after coming to Unity 5 (Missing ones because the old ones, Diffuse, diffuse detail were used.
     
    Last edited: Feb 15, 2015
  4. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    Any help? I could really use it
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    28,176
    Start with copying and pasting the first few like Tomas asked. Also report as bug if you can do so :)
     
  6. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,488
    I had to open, close, repopen, click "update", click "dont update" etc several times. Eventually everything just worked. I think the updater doesn't always kick in, or it kicks in and doesnt alert you that it's working or it's done something. After making a backup (important) maybe try reimporting, opening, closing a few more times to see if it sticks.
     
  7. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    Hi,

    Have you checked Editor.log to see if there's any sign or errors? If you want send this log to me and I'll take a look.

    Also,keep in mind that not all API changes can be automatically updated. Basically only errors in the editor console that contains the string "UnityUpgradable" should be automatically updated.

    If possible, please, file a bug and include a project that reproduces your issue as we'll investigate.

    Adriano
     
  8. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    This should not happen at all.

    API Updater is hooked to the compiler phase, so, whenever we finish compiling it should check, looking for compiler errors that indicates some script is using obsolete API that can be updated.

    If you can reproduce this, please file a bug and I'll investigate.

    Adriano
     
  9. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    Y
    Yes, in the error log or console it says UnityUpgradable but even when I run thw API it does nothing.

    I will sent you the Editor log in a couple of hours when I get home.
     
  10. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    This definitely looks like a bug in the updater.

    Cool; if you can file a bug and attach the project (or a stripped down version of the project that still reproduces the issue) it would be great.

    Adriano
     
    protopop likes this.
  11. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    The project is 3.9 gb so no, I cannot to that, nor give you scripts. Is there any way to fix this because I currently can ot give you logs as I'm working on something
     
  12. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,488
    Sometimes in the Unity menu the API UPDATER option is available, and sometimes it is greyed out. this happens independently of whether or not there are UNITY UPGRADEABLE errors in the console. And in my case it eventually worked in that my project suddenly started to run after opening and closing it several times, and alternately choosing update and not update (there's no rhyme or reason so i cant reproduce it). And when it is updating it spins a wheel and then nothing some of the time, so there isnt any feedback.

    You can also hep the updater along by changing any obsolete code before you update. I had 200+ errors because gameobject.active was deprecated in 4 but removed in 5 so what was a yellow error in 4 became project breaking in 5. I went through by hand and fixed all of those code entries so there was less for the API Updater to fix.

    The fact that it worked at all is testament to the hard work Unity engineers are doing. Im sure the whole idea is very complex so until the updater is responsive I still say try it a few more times (but backup first)
     
  13. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    That is actually true. There are some cases that we detect obsolete API through other means (for instance, in UnityScript, if you have code the sample below):

    Code (JavaScript):
    1. gameObject.rigidbody.mass = 10f;
    Anyway, if your scripts contains obsolete API that the updater knows how to handle then the updater must run; if it does not run, it is a bug.

    The option in "Assets/Run API Updater" should be enabled whenever we find that your scripts / assemblies are still using obsolete APIs that we know how to update.

    Indeed, this is one area we need to improve.

    Always backup :)

    Adriano
     
    protopop likes this.
  14. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    You don't need to share all your assets; your scripts / plugins are enough for me to debug (you can remove all other types of assets from your project and report an issue - of course, make a backup before ;)

    If you cannot share this information we cannot reproduce the issue unless some other user reports the very same problem and attach a project.

    If you cannot file an issue with your project, then sending the editor log is a start. Also you can provide as much information as possible, like, exact Unity version, whether some scripts got update or not, which ones failed to update, etc. and maybe I can spot what is causing the issue (but for sure, a bug with a repo project is your best option to get the issue sorted out / fixed ASAP).

    Adriano
     
  15. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    Where is the Editor.log?
     
  16. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
  17. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    I will sent you a private message now, with the log.

    Thanks
     
  18. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    Looking in the logs it is clear that API Updater is crashing (when it tries to update UnityScript scripts) but without your scripts it is hard to say what is the cause or how to fix it.

    One approach you can try is to remove your UnityScripts from your project and start reintroducing them one by one but I think this will break the references from your game objects to these scripts.

    Again, IMO your best bet is to provide us a repo case (that would be great since I bet other users will hit the very same issue sooner or later and I'd love to fix it).

    Adriano
     
  19. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    Can you give me an explanation on what is repo case (maybe report? ), as I would like to help others.

    So to test the script 1 by 1?
     
  20. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    Could it be that the
    Code (JavaScript):
    1. Random.RandomRange(4,15);
    is causing that?
     
  21. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    a "repo" case means "a project that reproduces" your issue
     
  22. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    I don't think so (but, as I said, without your project it is almost impossible to be sure).

    Your best option is to report a bug as explained in the docs: http://unity3d.com/BugReportingFAQ

    Adriano
     
  23. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    While holding the ALT key, it doesnt even start to the end. Its stucked at half way trough "Compiling scripts..."
     
  24. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    Hi

    I'd start making a backup of your project, then if possible, remove all non script assets and to open the project to make sure you still reproduce the issue.

    Now
    1. Select "Help\Report a bug" in Editor menu
    2. In the windows that appears (Unity Bug Reporter) click on "Folder..." button and select your project folder
    3. In "Problem Details" field, describe your issue as clear as possible
    4. Finally click in "Send Error Report" button.
    After reporting the bug post its number here (never post the bug url, only the bug #)

    Adriano
     
  25. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    Sorry for the late replay I was out of the country.
    I will do that today and see.
    But about the without scripts, it doesnt reproduce the issue as the scripts only have the errors, so removing them lets the game be playable "Just to enter the game"
     
  26. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    293
    No problem

    I think you misunderstood me. I said, "remove all NON script assets" :), i.e, remove all images, sounds, etc to make your project smaller to report the bug (this way you'll not need to upload 3.9 GB). Backup your project before removing any asset.

    Adriano
     
unityunity