Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by bazzer · Nov 28, 2012 at 06:37 AM · buildcompile

Help track down why some functionality is lost after building my game

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!

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Flynn · Nov 28, 2012 at 06:45 AM 0
Share

When you move the .exe around, do you move the data folder too? You probably do, but I want to be sure!

avatar image bazzer · Nov 28, 2012 at 06:51 AM 0
Share

Yeah, I copied the folder that contained the exe file and the data sub-folder.

I am looking into names of scripts etc now to remove anything that might cause problems (like an underscore char) but the problem is still there...

avatar image Flynn · Nov 28, 2012 at 07:15 AM 0
Share

Hmm, perhaps some light will be found in knowing the difference between your death animations, and your non death animations, as well as your death regen script. By any chance, are the death animations, and the death regen action, are they both being controlled form the same script? Furthermore, is your loss of health controlled form a SEPARATE script? Sounds like something is causing one specific script to go wrong

1 Reply

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by bazzer · Nov 28, 2012 at 09:03 AM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

XBox One Build FileNotFoundException 0 Answers

Build argument -reference:ALIAS=DLL 2 Answers

Lambda + micro mscorlib 0 Answers

Possible to compile for iOS for my testing without license? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges