|
Hello, I have been testing scripts that I am working on, in the most recent version of Unity on a 64 bit Windows 7 machine. When I assign a variable the first time, then run the code everything is hunky dory. If I change the amount of the variable and run the code again, very often the variable will not be updated. To get the code to run with the updated variable, I have to rename all the variables with the find and replace tool. I've tried restarting the application, and even rebooting the machine when this issue arise. I was wondering if anyone else was having this same problem and if a solution has been discovered. Best Regards, Steve
(comments are locked)
|
|
Serialised variables (those that appear in the inspector) will keep their values from the inspector even if you change the code. Your options are:
In general, choose carefully what you want to set from code and what from the inspector. Thanks Warwick, That did the trick. I was trying to "wait" to get too specific by marking them private, static, etc. I guess I need to stop doing that. :) Thanks again for your help! Best Regards, Steve
Jun 22 '11 at 12:51 AM
Grasshorse
(comments are locked)
|
