Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Jean-Fabre · Dec 30, 2010 at 09:02 AM · iphonesettingsipadapplicationplayersettings

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

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Jean-Fabre · Jan 01, 2011 at 02:11 PM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
4

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
Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jean-Fabre · Jun 28, 2013 at 02:52 PM 0
Share

Nice tip!, thanks for sharing

avatar image DannyB · Aug 03, 2013 at 09:00 AM 0
Share

This is indeed a great tip. Tested and working smoothly. I wonder why its not clearly documented on the PlayerPrefs documentation.

avatar image jlubeck · Jan 16, 2018 at 06:08 AM 0
Share

Is this still working? I can't seem to get it to work on Unity 2017. I see the preferences on the Settings App, but they are not being read inside my game... any ideas?

avatar image
0

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.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jean-Fabre · Dec 31, 2010 at 07:18 AM 0
Share

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.

avatar image Peter G · Dec 31, 2010 at 11:41 AM 0
Share

Ok, you will still need a plugin probably, I would search it in Google to get a full answer.

avatar image TedB · Feb 20, 2012 at 02:04 AM 0
Share

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. $$anonymous$$y 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?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Specify iphone project 1 Answer

Ampersand in application name 4 Answers

condition `!mono_debug_initialized' not met 0 Answers

IPhone 4 and IPad 2 lost audio on resume 0 Answers

About iPhone/iPad development 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges