Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

⚙️ Get app specific settings from the OS.

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

CandyCoded/AppSettings

Repository files navigation

App Settings

⚙️ Get app specific settings from the OS.

npm

Unity Package Manager

https://docs.unity3d.com/Packages/com.unity.package-manager-ui@2.0/manual/index.html

Git

{
 "dependencies": {
 "xyz.candycoded.appsettings": "https://github.com/CandyCoded/appsettings.git#v1.0.0",
 ...
 }
}

Scoped UPM Registry

{
 "dependencies": {
 "xyz.candycoded.appsettings": "1.0.0",
 ...
 },
 "scopedRegistries": [
 {
 "name": "candycoded",
 "url": "https://registry.npmjs.com",
 "scopes": ["xyz.candycoded"]
 }
 ]
}

Usage

Create Settings.bundle in iOS project

Note: This will have to be done on each new build so safe the .bundle file somewhere outside the Builds/ folder.

https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html

  1. Right-click on the project in the project navigator
  2. Click New File...
  3. Search for Resources / Settings Bundle
  4. Click Next
  5. Rename the file if necessary
  6. Click Create
  7. Click on the newly created Settings.bundle/Root.plist file in the project navigator
  8. Make necessary changes

Reference the values from your app

Note: The key used is the field Identifier in the Settings.bundle/Root.plist file.

using CandyCoded.AppSettings;
using UnityEngine;
public class TestAppSettings : MonoBehaviour
{
 private void Start()
 {
 Debug.Log(AppSettings.GetFloat("version"));
 }
}

About

⚙️ Get app specific settings from the OS.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /