0

I have a unity project that I am building to an executable (windows x86).

I have built the project previously and have made some changes to the project again that shows up in the unity editor and all is well with these changes.

These changes are however not showing up in the executable.

I have tried everything, rebuilding scripts, reload all, forcing the rebuilding of scripts through editor commands (https://forum.unity3d.com/threads/force-script-recompilation.176572/) and nothing seems to force the rebuilding of the exe with all the needed changes.

Unless there is a compiler bug that is extremely specific, then unity must be using a cached version. I am seeing it as entirely possible that I may have to reinstall unity to ensure full a rebuild is done.

4
  • I havent generate an executable for so long, but I think it was necessary to publish it. Are you doing so? docs.unity3d.com/Manual/PublishingBuilds.html It could happen you are not selecting the scene you are modifying or you are publishing your new changes in a different folder. Commented Jul 27, 2017 at 9:23
  • 1
    What i recall is there it also generates another file with the exe to run. Also another folder like playerPref or sth like that not sure. Try to remove all the previous builded files. Exe and folders. Rebuild your project again and see what happens. Commented Jul 27, 2017 at 9:28
  • 1
    Go to File -> Build Settings and then press the Build button. This should replace the old exe with the new on. If it doesnt, delete the old exe and then re-do this step. Commented Jul 27, 2017 at 10:05
  • Got it working, EmreE. There must be other files built with the exe that need to be moved and replaced. Every build you need to update your <project_name>_Data folder to ensure all changes are moved across! If EmreE wants to add this as the answer then, i'll mark it so. Commented Jul 27, 2017 at 10:17

1 Answer 1

1

For furter reference if people have the same problem;

When building exe on pc, it also creates another (Data)folder for exe to work with.

Quoting my comment;

Try to remove all the previous builded files. Exe and folders. Rebuild your project again and see what happens

With this as @ceorron said you are making sure that all changes are moved across.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.