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?
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?
Please be more specific, copy-paste the errors. And what do you mean “cannot open the API” ?
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.
Any help? I could really use it
Start with copying and pasting the first few like Tomas asked. Also report as bug if you can do so
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.
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
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
Y[quote=“Vagaus, post:7, topic: 567640, username:Vagaus”]
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
[/quote]
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.
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
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
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)
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):
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
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
Where is the Editor.log?
Best
Adriano
I will sent you a private message now, with the log.
Thanks
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
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?
Could it be that the Random.RandomRange(4,15);
is causing that?