Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![OpenUPM](https://img.shields.io/badge/dynamic/json?label=Downloads&labelColor=333A41&query=%24.downloads&suffix=%2Fmonth&url=https%3A%2F%2Fpackage.openupm.com%2Fdownloads%2Fpoint%2Flast-month%2Fextensions.unity.playerprefsex)](https://openupm.com/packages/extensions.unity.playerprefsex/)
[![Unity Editor](https://img.shields.io/badge/Editor-X?style=flat&logo=unity&labelColor=333A41&color=2A2A2A 'Unity Editor supported')](https://unity.com/releases/editor/archive)
[![Unity Runtime](https://img.shields.io/badge/Runtime-X?style=flat&logo=unity&labelColor=333A41&color=2A2A2A 'Unity Runtime supported')](https://unity.com/releases/editor/archive)
[![r](https://github.com/IvanMurzak/Unity-PlayerPrefsEx/workflows/release/badge.svg 'Tests Passed')](https://github.com/IvanMurzak/Unity-PlayerPrefsEx/actions/workflows/release.yml)
![License](https://img.shields.io/github/license/IvanMurzak/Unity-PlayerPrefsEx?labelColor=333A41&label=License)
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)

Expand Down
5 changes: 5 additions & 0 deletions Unity-Package/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"visualstudiotoolsforunity.vstuc"
]
}
10 changes: 10 additions & 0 deletions Unity-Package/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Unity",
"type": "vstuc",
"request": "attach"
}
]
}
3 changes: 2 additions & 1 deletion Unity-Package/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@
"decryptor",
"Encryptor",
"Prefs"
]
],
"dotnet.defaultSolution": "Unity-Package.slnx"
}
2 changes: 0 additions & 2 deletions Unity-Package/Assets/root/Editor/Gizmos/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions Unity-Package/Assets/root/Editor/Scripts.meta

This file was deleted.

2 changes: 0 additions & 2 deletions Unity-Package/Assets/root/Editor/Scripts/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions Unity-Package/Assets/root/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![OpenUPM](https://img.shields.io/badge/dynamic/json?label=Downloads&labelColor=333A41&query=%24.downloads&suffix=%2Fmonth&url=https%3A%2F%2Fpackage.openupm.com%2Fdownloads%2Fpoint%2Flast-month%2Fextensions.unity.playerprefsex)](https://openupm.com/packages/extensions.unity.playerprefsex/)
[![Unity Editor](https://img.shields.io/badge/Editor-X?style=flat&logo=unity&labelColor=333A41&color=2A2A2A 'Unity Editor supported')](https://unity.com/releases/editor/archive)
[![Unity Runtime](https://img.shields.io/badge/Runtime-X?style=flat&logo=unity&labelColor=333A41&color=2A2A2A 'Unity Runtime supported')](https://unity.com/releases/editor/archive)
[![r](https://github.com/IvanMurzak/Unity-PlayerPrefsEx/workflows/release/badge.svg 'Tests Passed')](https://github.com/IvanMurzak/Unity-PlayerPrefsEx/actions/workflows/release.yml)
![License](https://img.shields.io/github/license/IvanMurzak/Unity-PlayerPrefsEx?labelColor=333A41&label=License)
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Unity-Package/Assets/root/Tests/Editor/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Extensions.Unity.PlayerPrefsEx.Editor.Tests",
"rootNamespace": "Extensions.Unity.PlayerPrefsEx.Tests",
"references": [
"UnityEditor.TestRunner",
"UnityEngine.TestRunner",
"Extensions.Unity.PlayerPrefsEx"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using NUnit.Framework;
using BigInt = System.Numerics.BigInteger;

namespace Extensions.Unity.PlayerPrefsEx.Tests
namespace Extensions.Unity.PlayerPrefsEx.Editor.Tests
{
public class TestEncryptedStaticAPI
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using NUnit.Framework;
using BigInt = System.Numerics.BigInteger;

namespace Extensions.Unity.PlayerPrefsEx.Tests
namespace Extensions.Unity.PlayerPrefsEx.Editor.Tests
{
public class TestEncryptedVariablesAPI
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 32 additions & 32 deletions Unity-Package/Assets/root/Tests/Editor/TestStaticAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
using NUnit.Framework;
using BigInt = System.Numerics.BigInteger;

namespace Extensions.Unity.PlayerPrefsEx.Tests
namespace Extensions.Unity.PlayerPrefsEx.Editor.Tests
{
public class TestStaticAPI
{
const string Key = "PlayerPrefsEx-TestKey";

Type[] types = new[]
Type[] types = new[]
{
typeof(BigInt),
typeof(bool),
Expand All @@ -33,46 +33,46 @@ public void DefaultValue()
{
DeleteKeyAllTypes(Key);

Assert.AreEqual("",
Assert.AreEqual("",
PlayerPrefsEx.GetString(Key));
Assert.AreEqual("",

Assert.AreEqual("",
PlayerPrefsEx.GetString(Key, null));
Assert.AreEqual("",

Assert.AreEqual("",
PlayerPrefsEx.GetString(Key, default));
Assert.AreEqual("",

Assert.AreEqual("",
PlayerPrefsEx.GetString(Key, ""));
Assert.AreEqual("abc",

Assert.AreEqual("abc",
PlayerPrefsEx.GetString(Key, "abc"));
Assert.AreEqual(1,

Assert.AreEqual(1,
PlayerPrefsEx.GetInt(Key, 1));
Assert.AreEqual(1f,

Assert.AreEqual(1f,
PlayerPrefsEx.GetFloat(Key, 1f));
Assert.AreEqual(true,

Assert.AreEqual(true,
PlayerPrefsEx.GetBool(Key, true));
Assert.AreEqual(BigInt.One,

Assert.AreEqual(BigInt.One,
PlayerPrefsEx.GetBigInt(Key, BigInt.One));
Assert.AreEqual(DateTime.MaxValue - TimeSpan.FromDays(100),

Assert.AreEqual(DateTime.MaxValue - TimeSpan.FromDays(100),
PlayerPrefsEx.GetDateTime(Key, DateTime.MaxValue - TimeSpan.FromDays(100)));

Assert.AreEqual(Vector2.one * 3,
Assert.AreEqual(Vector2.one * 3,
PlayerPrefsEx.GetVector2(Key, Vector2.one * 3));

Assert.AreEqual(Vector2Int.one * 3,
Assert.AreEqual(Vector2Int.one * 3,
PlayerPrefsEx.GetVector2Int(Key, Vector2Int.one * 3));

Assert.AreEqual(Vector3.one * 3,
Assert.AreEqual(Vector3.one * 3,
PlayerPrefsEx.GetVector3(Key, Vector3.one * 3));

Assert.AreEqual(Vector3Int.one * 3,
Assert.AreEqual(Vector3Int.one * 3,
PlayerPrefsEx.GetVector3Int(Key, Vector3Int.one * 3));
}

Expand All @@ -82,31 +82,31 @@ public void InputOutputValuesAreEqual()
DeleteKeyAllTypes(Key);

PlayerPrefsEx.SetString(Key, "");
Assert.AreEqual("",
Assert.AreEqual("",
PlayerPrefsEx.GetString(Key));

PlayerPrefsEx.SetString(Key, null);
Assert.AreEqual("",
Assert.AreEqual("",
PlayerPrefsEx.GetString(Key));

PlayerPrefsEx.SetString(Key, default);
Assert.AreEqual("",
Assert.AreEqual("",
PlayerPrefsEx.GetString(Key));

PlayerPrefsEx.SetString(Key, "");
Assert.AreEqual("",
Assert.AreEqual("",
PlayerPrefsEx.GetString(Key, ""));

PlayerPrefsEx.SetString(Key, "abc");
Assert.AreEqual("abc",
Assert.AreEqual("abc",
PlayerPrefsEx.GetString(Key));

PlayerPrefsEx.SetInt(Key, 10);
Assert.AreEqual(10,
Assert.AreEqual(10,
PlayerPrefsEx.GetInt(Key));

PlayerPrefsEx.SetFloat(Key, 10f);
Assert.AreEqual(10f,
Assert.AreEqual(10f,
PlayerPrefsEx.GetFloat(Key));

PlayerPrefsEx.SetBool(Key, true);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
using NUnit.Framework;
using BigInt = System.Numerics.BigInteger;

namespace Extensions.Unity.PlayerPrefsEx.Tests
namespace Extensions.Unity.PlayerPrefsEx.Editor.Tests
{
public class TestStaticAndVariablesAPIs
{
const string Key = "PlayerPrefsEx-TestKey";

Type[] types = new[]
Type[] types = new[]
{
typeof(BigInt),
typeof(bool),
Expand Down Expand Up @@ -70,7 +70,7 @@ public void SharedValueBetweenVariablesAndStaticAPIsDateTime()
{
DeleteKeyAllTypes(Key);
SharedValueByTheSameTypeAndKeyBetweenInstanceAndStaticAPIs(Key, PlayerPrefsEx.GetDateTime, PlayerPrefsEx.SetDateTime, new PlayerPrefsDateTime(Key), DateTime.MaxValue - TimeSpan.FromDays(3), DateTime.MaxValue - TimeSpan.FromDays(3000));

}
[Test]
public void SharedValueBetweenVariablesAndStaticAPIsFloat()
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Unity-Package/Assets/root/Tests/Editor/TestVariablesAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
using NUnit.Framework;
using BigInt = System.Numerics.BigInteger;

namespace Extensions.Unity.PlayerPrefsEx.Tests
namespace Extensions.Unity.PlayerPrefsEx.Editor.Tests
{
public class TestVariablesAPI
{
const string Key = "PlayerPrefsEx-TestKey";

Type[] types = new[]
{
typeof(BigInt),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Unity-Package/Assets/root/Tests/Runtime/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Extensions.Unity.PlayerPrefsEx.Tests",
"rootNamespace": "Extensions.Unity.PlayerPrefsEx.Tests",
"references": [
"UnityEngine.TestRunner",
"Extensions.Unity.PlayerPrefsEx",
"UnityEditor.TestRunner"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading