Essentially, once I run/build my project, it’s building old versions of the scenes (after I’ve edited them and tested the changes in the editor) and I don’t know why. I picked up a project from someone else (for work) and was asked to add some new features. I did that, tested them in the editor and they work alright. So then I try to build it and when I go to run it, and it’s the old version of the main menu scene without my edits.
I’ve tried deleting the Library folder (with all the cashe) and then building from there, but it still builds the old scenes rather than the newly edited ones. I’m a bit new to unity, so is there something else I need to do to have it rebuild completely?
I don’t know if it’s relevant, but once built, it says the application was last modified long before I put the changes (see below).
I ran across this same issue and found this while trying to fix it. Turns out my problem was something else, I renamed my scene from SampleScene to something actually relevant.
I had to go into Build Settings under the File menu, remove SampleScene, and press the Add Open Scenes button.
Hopefully if someone else is Googling to solve this problem they’ll find this!
And are you sure that the build is actually succeeding? Delete the last build, or build to a completely new directory just to make sure. And look in the editor log immediately after making a build to check for any errors encountered. Also check the list of included scenes in the build settings to make sure you’re not including an old version of the scene.
TL;DR; Close Unity, delete Library and obj, restart Unity and build again.
This is an old question, but we had the same problem so maybe it can help someone else. We’re using Unity 2017.3.1p4 BTW.
We updated our loading scene and it was updated in the editor but the Android build didn’t include our recent changes. No errors in the build and the APK file’s timestamp was recent.
- I closed Unity
- Deleted the Library and obj folders
- Restarted Unity.
- Had to revert some .meta files (mainly Spine2D related files)
- Switch the platform back to Android
- Set the Minify settings to use Proguard.
I then built a new version and the loading scene was updated to the correct version.
So what causes this? I just ran into the same issue and thought I was going crazy!
Steam will check if you are running through Steam and restart the program in Steam if you are outside of it, and this is what was causing my old version to keep running. I found that using “Build and Run” would somehow bypass this and run the game with the latest code though. I used Unity 2021.3.11f