-
Notifications
You must be signed in to change notification settings - Fork 18
PlayerPrefProperty
Matheus Lessa Rodrigues edited this page Oct 28, 2017
·
1 revision
A series of classes that make it easy to use and change values of PlayerPref
as if they were class fields.
using UnityEngine;
using BitStrap;
public sealed class MyScript : MonoBehaviour
{
public PlayerPrefInt myIntPlayerPref = new PlayerPrefInt( "TheKeyToMyPlayerPref" );
public PlayerPrefString myStringPlayerPref = new PlayerPrefString( "AnotherKeyToAnotherPlayerPref", "SomeDefaultValue" );
public PlayerPrefBool myBoolPlayerPref = new PlayerPrefBool( "OneMoreKeyToMyPlayerPref" );
public PlayerPrefFloat myFloatPlayerPref = new PlayerPrefFloat( "TheLastKeyToMyPlayerPref" );
private Start()
{
myIntPlayerPref.Value = 17; // Write values to PlayerPref
Debug.Log( myStringPlayerPref.Value ); // Read values from PlayerPref
}
}
- UMake
- WebApi
- AnimationUtilities
- EditorGraph
- RuntimeConsole
- Editor Tools
- BehaviourButton
- Isolate
- Custom Editors and Property Drawers
- Tween
- Util