- Home /
Why is unity is building old versions of my scenes?
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).
Answer by tanoshimi · Apr 28, 2017 at 08:36 AM
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.
I'm having the same problem OP is having.
Deleting the last build version only got me so far, all of the new behavior was implemented but I can not for the love of Celestia get rid of a old behavior in a button of $$anonymous$$e. It used to delete itself on pointer down, I changed it to something else and now it works on preview and builds without errors, but it still deletes itself on build version.
Answer by TheChosenBlob · Nov 22, 2018 at 07:36 AM
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.
Answer by jkfluffyghost · Jan 12, 2020 at 10:16 PM
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!
Answer by PlasticCogLiquid · Jan 28, 2019 at 05:04 AM
So what causes this? I just ran into the same issue and thought I was going crazy!
Hi,
Did you manage to figure this one out? $$anonymous$$ind regards,
J
Did you try to delete the Library folder and restarting Unity?