forked from Deadcows/MyBox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Deadcows/MyBox
- Loading branch information
Showing
29 changed files
with
398 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#if UNITY_EDITOR | ||
using System; | ||
using UnityEditor; | ||
|
||
namespace MyBox.EditorTools | ||
{ | ||
[Serializable] | ||
public class EditorPrefsBool : EditorPrefsType | ||
{ | ||
public bool Value | ||
{ | ||
get => EditorPrefs.GetBool(Key); | ||
set => EditorPrefs.SetBool(Key, value); | ||
} | ||
|
||
public EditorPrefsBool(string key) => Key = key; | ||
|
||
public static EditorPrefsBool WithKey(string key) => new EditorPrefsBool(key); | ||
} | ||
} | ||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#if UNITY_EDITOR | ||
using System; | ||
using UnityEditor; | ||
|
||
namespace MyBox.EditorTools | ||
{ | ||
[Serializable] | ||
public class EditorPrefsFloat : EditorPrefsType | ||
{ | ||
public float Value | ||
{ | ||
get => EditorPrefs.GetFloat(Key, 0); | ||
set => EditorPrefs.GetFloat(Key, value); | ||
} | ||
|
||
public EditorPrefsFloat(string key) => Key = key; | ||
|
||
public static EditorPrefsFloat WithKey(string key) => new EditorPrefsFloat(key); | ||
} | ||
} | ||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#if UNITY_EDITOR | ||
using System; | ||
using UnityEditor; | ||
|
||
namespace MyBox.EditorTools | ||
{ | ||
[Serializable] | ||
public class EditorPrefsString : EditorPrefsType | ||
{ | ||
public string Value | ||
{ | ||
get => EditorPrefs.GetString(Key); | ||
set => EditorPrefs.SetString(Key, value); | ||
} | ||
|
||
public EditorPrefsString(string key) => Key = key; | ||
|
||
public static EditorPrefsString WithKey(string key) => new EditorPrefsString(key); | ||
} | ||
} | ||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#if UNITY_EDITOR | ||
using System; | ||
using UnityEditor; | ||
|
||
namespace MyBox.EditorTools | ||
{ | ||
[Serializable] | ||
public class EditorPrefsType | ||
{ | ||
public string Key { get; protected set; } | ||
|
||
public bool IsSet => EditorPrefs.HasKey(Key); | ||
|
||
public void Delete() => EditorPrefs.DeleteKey(Key); | ||
} | ||
} | ||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.