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?
Answer by Jean Fabre
Jan 01, 2011 at 02:11 PM
It will need to be coded within xcode:
Odd that Unity doesn't expose this actually,
Answer by TedB
Feb 22, 2012 at 06:46 PM
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
Nice tip!, thanks for sharing
This is indeed a great tip. Tested and working smoothly. I wonder why its not clearly documented on the PlayerPrefs documentation.
Answer by Peter G
Dec 30, 2010 at 01:26 PM
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, thanks for the infos, I actually don't want to show the setting within the app, at least not just that way, what I am after is exposing settings within the OS itself when the user select "settings" and then select my app in the list on the left side at the bottom. that's where I would like settings to be available.
Ok, you will still need a plugin probably, I would search it in Google to get a full answer.
I’ve done a lot of searching and I have not found the answer to this question. I have been using Native Toolkit to display a iOS view, but as the original quesiton states, that isn’t desired. My app just needs to be ble to access the settings defined in the Settings.bundle in the IOS project. So, how would I access the settings?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
3 People are following this question.
Ampersand in application name
Specify iphone project
Pinch vs. Rotate gestures: can they be made size/resolution-independent?
Unity integration into an existing iPad app
Mail generation with ipad app