https://github.com/LightBuzz/Settings-Unity
Settings utility for Unity3D.
https://github.com/LightBuzz/Settings-Unity
Last synced: about 1 year ago
JSON representation
Settings utility for Unity3D.
- Host: GitHub
- URL: https://github.com/LightBuzz/Settings-Unity
- Owner: LightBuzz
- License: apache-2.0
- Created: 2018-04-02T13:02:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-02T10:34:29.000Z (about 7 years ago)
- Last Synced: 2025-04-05T16:51:14.288Z (about 1 year ago)
- Language: C#
- Size: 585 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- 3d-resources - Settings Unity
README
# Settings utility for Unity apps
An easy-to-use mechanism for managing your game settings (```PlayerPrefs```) within your Unity app. The ```LightBuzz.Settings``` framework is exposing a generic C# API that allows you to store a lot of different value types.
```
DateTime date = Settings.Get("date_time_key");
```
## Supported data types
The following data types are currently supported:
* ```bool```
* ```int```
* ```short```
* ```long```
* ```float```
* ```double```
* ```string```
* ```DateTime```
* ```Guid```
## Supported Platforms
The ```LightBuzz.Settings``` framework supports all of the Unity platforms:
* Android
* iOS
* Standalone (Windows & Mac OS X)
* Universal Windows Platform (UWP)
* HoloLens
## Examples
Simply import the [latest Unity Package](https://github.com/LightBuzz/Settings-Unity/releases/latest) or the ```LightBuzz.Settings.dll``` file in your Assets folder.
### Initialization
Upon importing the assembly to your project, include its namespace in your C# file:
```
using LightBuzz.Settings;
```
Then, initialize the Settings module from Unity's main thread:
```
private void Start()
{
Settings.Initialize();
}
```
### Add / Update a setting
```
Settings.Set("name", "Vangos Pterneas");
Settings.Set("nice_guy", true);
Settings.Set("height", 1.670);
Settings.Set("birthday", new DateTime(1988, 05, 20));
```
### Retrieve a setting
```
string name = Settings.Get("name");
bool niceGuy = Settings.Get("nice_guy");
double height = Settings.Get("height");
DateTime birthday = Settings.Get("birthday");
```
### Delete a setting
```
Settings.Remove("name");
Settings.Remove("nice_guy");
Settings.Remove("height");
Settings.Remove("birthday");
```
## Contributors
* [Vangos Pterneas](http://pterneas.com) from [LightBuzz](http://lightbuzz.com)
## License
You are free to use these libraries in personal and commercial projects by attributing the original creator of the project. [View full License](https://github.com/LightBuzz/Settings-Unity/blob/master/LICENSE).