- Home /
Can you change the iPhone generation that is used when running in Unity iPhone?
I asked elsewhere how you can identify the hardware your game is running on and was told
iPhoneSettings.generation
is the key.
This is great. But unfortunately having added it into my code, I am now always destined to be an "unknown" iPhone generation when running in the editor.
It'd be nice for testing things if you could change the generation that was reported to Unity. Is this possible?
Cheers
Answer by Murcho · Feb 21, 2010 at 11:26 PM
Probably the easiest way around this would be the have an enumerator set of all the iPhone/iPod touch models, and a global variable set to one of these in a script. Then where ever you are checking iPhoneSettings.generation, if it returns unknown, use the global variable as the generation setting. That way you have full control, and removing it from your code for publishing should be fairly straight forward.
Your answer
Follow this Question
Related Questions
Mesh building changes in Unity 3.5.6 0 Answers
What exactly can you can and can't you do when developing for iOS on Windows 1 Answer
Plans for Unity iPhone on Windows? 3 Answers
Code differences between Unity Editor and real iPhone ; a String.Split or IndexOf problem. 2 Answers
How to set up UV for lightmaps for generated meshes? 4 Answers