Skip to content

Unity PlayerPrefs extensions

License

MIT, Unknown licenses found

Licenses found

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

debox-dev/playerprefs

Repository files navigation

DeBox PlayerPrefs

Helpful extensions for the Unity PlayerPrefs sub-system

Installation instructions

  • Open your project manifest file (MyProject/Packages/manifest.json).
  • Add "com.debox.playerprefs": "https://github.com/debox-dev/playerprefs.git" to the dependencies list.
  • Open or focus on Unity Editor to resolve packages.

Requirements

  • Unity 2019 or higher.

Examples

using DeBox.PlayerPrefsExtensions;

public class MyClass
{
   private readonly PlayerPrefsInt _playerGold = new PlayerPrefsInt("gold", 0);

   public void GetGold()
   {
       return _playerGold.Value;
   }

   public void AddGold(int value):
   {
       _playerGold.Value += value;
   }

   public void ResetGold()
   {
       _playerGold.Delete();
       // _playerGold.Value will return 0 now
   }
}

About

Unity PlayerPrefs extensions

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages