iOS application in the settings panel

Hi,

It is possible to expose settings under iOS so that we can let the user set up the 3d application from within the settings panel, just like you can fro example change the diaporoma settings of the Photos application or other application you install and then show up in the list down below.

Is that something to code in xcode after the app is built by unity?

Thanks,

Jean

After a fair amount of digging, another developer clued me in. I find it odd that this is not mentioned in the Unity reference manual for PlayerPrefs, and hope that it can be added.

All one needs to do is add a Settings.bundle to the iOS project, configure it so the settings you want exposed are set using the plist editor, and then reference the same variable names you use there in your Unity project.

So, for example, if you double-click your root.plist in the Settings.bundle and add a PSToggleSwitchSpecifier named some_variable, you can retrieve that setting in your Unity project like this:

  variableName = PlayerPrefs.GetInt(“some_variable", 1); // where 1 is the value returned if the user has not specified a setting

Yes, you can do that, you would need to use a plugin in xcode. Basically any native iPhone interface feature except the keyboard and touches needs a plugin. Once you hide the Unity window, its just like any normal iphone application.

There are several ways you could save your settings:

  • UnitySendMessage() which would let you pass variables 1 at a time into Unity,

  • You could use PlayerPrefs/NSUserDefaults to store data and retrieve it.

  • You could save a file in your obj-c code then use WWW to read it.

Then at the end hide/remove your view and show the Unity view again to the player.

Hi,

It will need to be coded within xcode:

http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Preferences/Preferences.html#//apple_ref/doc/uid/TP40007072-CH6-SW6

Odd that Unity doesn't expose this actually,

Bye,

Jean