I have been building a simple rpg game and learning about Unity and C# in the process. Things have been going well until I came across a weird problem that I have been unable to solve by myself.

The problem is that when I build my game for Windows platform some of the functionality is lost yet there are no errors given during the compile process.

Examples of lost functionality - Death animations wont work but all other animations work fine on my enemies. - My regen routine doesnt work at all but loss of health on hits etc works just fine…

Some background info:
Started on Unity 3.5 and since upgraded to V4 to see if this fixed the problem. It didnt help, problem still remains. Tried on Win7 and now on Win8…same problem.

If I copy my whole project folder to another PC and play the build exe from within the project folder everything works fine…

If I make a Build of the Game in some other directory and copy just the build Folder to another PC the problem reoccurs.

This is driving me crazy as my children want to help test the game but every time i make some changes I have to copy the whole project folder to their PC and I have downloaded a bunch of assets into my project folder that I dont yet use in the game. The build version of the game comes in at 120 meg yet my project folder is around 2 gig (yes I hoard stuff I guess).

Any pointers would be greatly appreciated!

I found the problem. It seems there was a problem with my save game location. I was saving to a text file in my Resources folder and it appears that Unity only wants to Read from this folder (ReadOnly). I changed my save routine to use PlayerPrefs for now which is a temporary work-around until I find a better solution.

It explains why I was not receiving any errors during the build phase, as my SaveGame routine only kicked in when something changed after the game had started.

Something to note was the strange behaviour of my game. Some functions/methods worked from the Script that had the SaveGame function/method while others didnt (such as my regen).

Anyways, thanks for your help Flynn. Your mentioning about SEPERATE script got me looking for any other scripts that may have been involved and along the way I found a file in the Data folder called “output_log.txt”. This file had the error about the SaveGave failing which allowed me to solve the problem.