I have a number of different builds happening at the moment, one for the iphone/ipod, one for ipad and one for android. The upkeep is becoming a pain and I would like to modify my code base to be able to support all three and let me simply copy and paste into the different projects. I am aware of the #if IPHONE_UNITY and #if IPHONE_ANDROID and I know of the iPhoneSettings.generation to get the iOS device. My problem is I have some vectors (for example) that are defined and declared at the start of the script, but when I place them inside of these # statements and set them all up individually for each build the functions that use them no longer recognise them as being in scope. Is there a way to do what I am trying to do?
Are you sure that you declare the variable outside the scope with a default value assigned so it does not warn you due to being unassigned when used?