Blog
- Took a backup of the project
- Upgrading the project to unity 2022.3.11f1 resulted in one error and a few warnings most based on HTTP request not allowed: “System.InvalidOperationException: Insecure connection not allowed”
https://forum.unity.com/threads/external-links-dont-open-from-editor-1363749.1167556/
- I looked for the settings and changed it from project settings-> player-> Allow downloads over HTTP (change to always allowed). This removed all except for one warning.
- The last warning was: “Cannot add menu item ‘GameObject/3D Object/ProBuilder Basic Cube _%k’ for method ‘ProBuilder2.EditorCommon.pb_Geometry_Interface.MenuCreateCube’ because a menu item with the same name already exists.”
- Fixed it by installing probuilder from the package manager. Apparently, the project while updating installed an obsolete version of Probuilder and now doing this through the project manager downloaded the up-to-date version and uninstalled the old one.
- Now all errors are removed.
- Downloaded the version control package from the package manager.
- Windows-> Unity version control. Then select create workspace from the Unity version control window.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Candy Shop
- Took a backup of the project
- Upgraded project unity version to the 2022 LTS
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Domestic molotov
- Took a backup of the project
- Upgrading the project to unity 2022.3.11f1 resulted in multiple errors like: “The type or namespace name ‘UI’ does not exist in the namespace ‘UnityEngine’ (are you missing an assembly reference?)” (for Image and Text as well)
- I had to revert to the backup and upgrade the project gradually; 2018 then 2021 then 2022. This didn’t produce the errors.
- While testing the project in all unity versions it seems to be buggy when throwing the boxes. There is a high possibility that I was making some changes in the project and I left it in the middle without solving the bugs there (I seem to have a zip file with the original GGJ version with a tiny bit smaller size). Either that or the upgrade process messed something up. Either way, I have a backup of the project with its original version 2017 but I think I will probably fix the project in the latest version instead.
- Renamed project from GGJ 2019 to DomesticMolotov following these instructions:
https://tarynwritescode.hashnode.dev/how-to-rename-your-unity-game
- Researched a persistent error after upgrade: “Component GUI Layer in Main Camera for Scene Assets/Scenes/Gameplay.unity is no longer available.”. Turns out the solution was to remove the flare component from the main camera as advised here:
- Updated the UI of the scene because it was so messed up and set it to scale with screen size.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Surviving the flood
- Took a backup of the project
- Upgraded the project gradually; from a 2018 earlier version to 2018 LTS. A bug appeared where movement left or right doesn’t stop when releasing the movement keys. Should be easy enough to fix later.
- Won’t need to fix the bug because upgrading to 2021 fixed it. Another error appeared for UIelements that was solved by commenting the respective “using” line. The moving background seems to be missing chunks though.
- Upgrading to 2022 didn’t result in any errors.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
The Hoarder’s curse
- Took a backup of the project
- Upgraded the project gradually; from 2017 to 2018. No errors but a lot of warnings.
- Upgraded to 2021 and had the same error that occurred while upgrading Domestic Molotov and fixed it.
- Upgraded to 2022 with no errors but there is a persistent repetitive warning. The warning was solved by removing the nav obstacle component from the nav agent prefab.
- Renamed the project.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Particle fun
- Took a backup of the project
- Upgraded the project gradually; from 2017 to 2018 which resulted in many warnings and one error due to a web reference. Fixed it by changing web to webGL.
- Upgraded to 2021 and fixed again two errors due to deprecated references.
- Upgraded to 2022 resulted in many warnings and few errors. First error was due to the SDK not being added but I wasn’t able to add it to this unity version because it needed to be updated. Updating it solved this error. The second error was
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Quiz Maker
- Took a backup of the project
- Upgraded from 2018 to 2021 without issues (couldn’t test much because I don’t remember where I reached in my login implementation).
- Upgraded to 2022 without issues.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Snake Game
- Took a backup of the project
- Upgraded the project gradually; from 2017 to 2018 then to 2021 then to 2022 which resulted in many warnings and few errors.
- One error was due to missing the Android SDK. Fixed it by adding SDK location (home) in project preferences. It still says that I am not using the recommended version for some reason but the error is gone. Should check it later.
- Again had the same error that occurred while upgrading Domestic Molotov and fixed it.
- Another error: “Assembly ‘Assets/PlayServicesResolver/Editor/Google.IOSResolver.dll’ will not be loaded due to errors: Unable to resolve reference ‘UnityEditor.iOS.Extensions.Xcode’. Is the assembly missing or incompatible with the current platform? Reference validation can be disabled in the Plugin Inspector.”
I researched this error and found I needed to uncheck validate references in the plugin settings. This post helped me with the solution:
https://github.com/googlesamples/unity-jar-resolver/issues/412
And this link showed me how to modify the setting by selecting the plugin file:
https://docs.unity3d.com/Manual/PluginInspector.html
- The error stayed but restarting Unity and then clearing the console removed it.
- There are several Facebook package warnings but they can wait for later.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Maly Game
- Took a backup of the project
- Proceeded to test the project to make sure that everything was working fine before starting to upgrade.
- Fixed one error due to the wrong image file being placed (sweetsbuttonup). And made sure the correct image file had read/write enabled set to true.
- There are still 4 errors and 1 benign warning that occur when starting the game but I will leave them for now and attempt to start upgrading.
- Upgraded the project gradually; from 2018 to 2021 and then to 2022. Errors didn’t change.
- The same iOS error that occurred in the snake game occurred here too and I fixed it.
- There are two other errors that seem to be connected and it seems recommended to install the iOS module to solve them all based on this link among other research:
- Actually installing the module didn’t solve it and I had to delete the play services resolver folder and import the External dependency manager folder package from here (solution 1):
- Now the last two errors where because of Text Mesh Pro. Error: “The type or namespace name ‘TMP_UiEditorPanel’ could not be found”. I fixed it by going to the script and changing ‘TMP_UiEditorPanel’ to ‘TMP_EditorPanelUI’ as advised here:
https://github.com/pnarimani/RTLTMPro/issues/52
- Created a repository for the project and checked into Unity version control(Plastic SCM).
3araby
- Took a backup of the project
- Proceeded to test the project to make sure that everything was working fine before starting to upgrade.
- Upgraded the project gradually; from 2018 to 2021 and then to 2022. Some errors appeared along the way.
- Resolved some previously encountered errors like the HTTP errors and the GUI errors.
- Resolved an error in the “Level_Loader” script because of the attempted destruction of the same object in a loop. Adding a break at the end of the loop guaranteed this wouldn’t happen and removed the error.
- Another error due to using the obsolete “www” was resolved by replacing it with the current “UnityWebRequest” class.
- After more testing, no more errors appear. Although it appears the project was abandoned in the middle of Facebook integration.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Character procedural generation
- Took a backup of the project
- Upgraded the project gradually; from 2021 to2022 successfully with no errors
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Paint Letters
Note: this was a test demo that wasn’t working yet.
- Took a backup of the project
- Upgraded the project gradually; from 2019 to 2021 and then to 2022 successfully.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Sales tycoon
Note: this was a test demo that wasn’t finished
- Took a backup of the project
- Upgraded the project gradually; from 2018 to 2021 and then to 2022 successfully.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Mission Power On
- Took a backup of the project
- Upgraded the project gradually; from 5.6 to 2018, 2021, and then to 2022 successfully.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
The Sinister Beat
- Took a backup of the project
- Upgraded the project gradually; from 5.6 to 2018, 2021, and then to 2022 successfully.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Much Older Projects
Acoustic
- Took a backup of the project
- Upgraded the project gradually; from 5.4 to 2018 which resulted in many warnings and few errors. Running the project made Unity unresponsive and was forced to quit.
- After some testing, it turned it out to be an infinity loop bug that was left in the project from the last time. I fixed it and it is responsive now. It should be noted that the project was left in an incomplete state although the aesthetics are promising.
- Proceeded to upgrade the project; from 2018 to 2021 which resulted in two errors related to GUI and since I wasn’t using GUI anyway, I proceeded to upgrade again to 2022 to see if it would go away but it didn’t.
- Now I followed the advice in the console and changed obsolete GUI references to UI references: “error CS0619: ‘GUIText’ is obsolete: ‘GUIText has been removed. Use UI.Text instead.’” and that removed the errors and was stable when tested.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Character customization (Teddy)
- Took a backup of the project
- Upgraded the project gradually; from 5.4 to 2018. The project ran well as there is very little code there. It is obvious though that most of the code work was left unfinished.
- Proceeded to upgrade the project; from 2018 to 2021 and then to 2022 successfully.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Crash Course
- Took a backup of the project
- Upgraded the project gradually; from 5.6 to 2018. The project ran well but one of the effects on the character does not appear visually for some reason. I will attempt to fix it after I complete upgrading.
- Proceeded to upgrade the project; from 2018 to 2021 successfully and also it solved the particle effect appearance alhamdulillah. A new run time error appears: “ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: The input color to be converted must not contain negative values (red: 0.3363363, green: 0.02676579, blue: -0.00140002).”
- Proceeded to upgrade the project to 2022 anyway to see if it would go away but unfortunately the error persists. Researching it didn’t yield anything except that maybe it was a bug from Unity. After some testing, I pinpointed the cause to be the directional light and it seems to have the wrong representation for the displayed color. I used the color picker to reselect the color and that solved the problem.
- Note: There is an error in scene 3 because of an unfinished work attempt to integrate the enemy target with the procedural generation.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
There shall be light
- Took a backup of the project
- Upgraded the project gradually; from 5.6 to 2018 but testing the project seems unresponsive. Testing the project showed that there are two missing scripts in the inspector due to errors. I continued upgrading to 2021 and then to 2022 with no status change.
- Further testing showed that there are a couple of js scripts and of course, now Unity couldn’t identify them and so couldn’t attach them to their respective game objects.
- Using chatGPT I converted the js scripts to c# after some struggle but finally this resolved all the issues and the game worked fine.
- Note: This project needs particularly heavy cleaning to be done in the future.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Survive the Night
- Took a backup of the project
- Upgraded the project gradually; from 5.3 to 2018 with 41 errors. Decided to continue upgrading anyway to see whether they will persist. Upgrading to 2021 and then 2022 requested safe mode and displayed two errors due to obsolete classes GUITexture and GUIText. I followed the advice here to just replace it with Image and Text:
https://forum.unity.com/threads/error-message-for-guitexture.1056419/
- Another error appeared due to the obsolete Webplayer which was easily solved by replacing it with WebGL. After that, the project ran successfully.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Space Shooter Mobile
Note: This project was written in JavaScript which is not supported in the later versions so we will need to convert most of the scripts to C#.
- Took a backup of the project
- Upgraded the project gradually; from 5.6 to 2018 with many errors. Decided to continue upgrading anyway to see whether they would persist. Upgrading to 2021 and then 2022 requested safe mode and displayed the same errors here and here.
- Three more errors in some editor scripts that seem to be missing a class dependency that I couldn’t find. I don’t think I actually used these editor scripts before so I decided to comment their content. This removed the remaining errors.
- Now the next part will begin. I need to convert the JS scripts to C#. Using chatGPT I successfully did so. In the beginning, I tried using an AI assistant plugin but after testing it I found it consumes money and I can get the same result free from the OpenAI website.
- Now I need to reassign the script for everything to work again. That took quite some time.
- After I did so there were some bugs that led to unplanned behaviors and also Unity crashing so I needed to do some maintenance on some scripts which fixed all issues.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Villa Demo
Note: This project was written solely in JavaScript which is not supported in the later versions so we will need to convert all the scripts to C#.
- Took a backup of the project
- Upgraded the project gradually; from an unknown old Unity version to 2018, 2021 then 2022. Didn’t try to test since all the scripts need to be converted to C# first. But no out-of-the-box errors either.
- Now the next part will begin. I need to convert the JS scripts to C#. Using chatGPT I successfully did so for my own scripts. The tricky part is the character controller and FPS Controller standard assets scripts.
- I was skeptical that it would work easily but after some help from chat GPT, I converted the standard assets scripts as well to C#. The only thing that I needed to do was to make the subclasses in the CharacterMotor script serializable so I could update them from the inspector.
- After that, I updated the variables values from the values that Unity (thankfully) stored from the past.
- I tested it and there seemed to be some minor bugs in the movement and camera look which required some tinkering but eventually, I got it to work.
- The one bug that took most of the time was the character controller not able to climb steps (stairs or otherwise). Tinkering didn’t help so I researched and I found the solution in my case was to increase the step offset of the character controller to 90.
https://discussions.unity.com/t/character-motor-wont-go-up-stairs/12077/6
- Created a repository for the project and checked into Unity version control(Plastic SCM).
King of Asphalt
- Took a backup of the project
- Upgraded the project gradually; from 5.4 to 2018 which produced many strange errors researching some of which led to talk about bugs in earlier unity versions. I decided to go with my gut feeling and continue upgrading to 2021 then to 2022. This decreased the errors considerably.
- I had to enter safe mode and check the remaining errors. Two errors were related to IAP older modules. “error CS1704: An assembly with the same simple name ‘Purchasing.Common’ has already been imported. Try removing one of the references (e.g. ‘/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll’) or sign them to enable side-by-side.” Researching this error I found an article advising to delete the IAP folder and library folder which did remove the error.
- Another IAP-related error is still there. Following the advice of Unity, I updated the IAP package from the package manager but this didn’t solve the issue (but I think it was necessary as part of the solution). Now I added the code here and that removed the error (added not replaced as suggested. Replacing will not remove the error):
https://stackoverflow.com/questions/59077185/cant-implement-interface-member-istorelistener
- There was a Rider-related error that may have been the main reason for the safe mode. I updated the Rider package from the package manager but the error persisted. After more research, I found some related articles for similar errors that suggested deleting the .dll file but in my case, I just removed the rider package, deleted the library folder, and reopened the project and this removed the error for me.
- Now remains 17 repeated errors like this one “error CS0619: ‘GUITexture’ is obsolete: ‘GUITexture has been removed. Use UI.Image instead.’” and it seems that these are the ones causing the safe mode prompt. I went one by one and replaced the obsolete class.
- Note: This project needs particularly heavy cleaning to be done in the future.
- Created a repository for the project and checked into Unity version control(Plastic SCM).
Editor scripts
- Used a replace with prefab editor script for replacing multiple game objects with a prefab
https://unity3d.college/2017/09/07/replace-gameobjects-or-prefabs-with-another-prefab/
- In the 2022 unity version it seems that this problem was addressed(need to check it more).
Comments
- To add a description to a function, I need to insert three slashes after I change some preferences.
- Inline comment: ctrl + /