diff --git a/Achievments/AchievmentException.cs b/Achievments/AchievmentException.cs index 3ae6dea..041c7b9 100644 --- a/Achievments/AchievmentException.cs +++ b/Achievments/AchievmentException.cs @@ -18,7 +18,7 @@ namespace NEG.Utils.Achievments } } - public class AchievmentTypeExcetion : AchievmentException + public class AchievmentTypeException : AchievmentException { /// /// Expected achievment type under @@ -34,7 +34,7 @@ namespace NEG.Utils.Achievments /// public Type Actual { get; private set; } - public AchievmentTypeExcetion(string message, string achievmentId, Type expectedType, Type actualType) : base(message, achievmentId) + public AchievmentTypeException(string message, string achievmentId, Type expectedType, Type actualType) : base(message, achievmentId) { Expected = expectedType; Actual = actualType; diff --git a/Achievments/AchievmentManager.cs b/Achievments/AchievmentManager.cs index 56e361a..7ae0dd2 100644 --- a/Achievments/AchievmentManager.cs +++ b/Achievments/AchievmentManager.cs @@ -164,6 +164,7 @@ namespace NEG.Utils.Achievments /// /// /// + /// throws an if there is no achievment under id public bool IsCompleted(string id) { return GetAchievmentForId(id).IsCompleted; @@ -172,9 +173,9 @@ namespace NEG.Utils.Achievments #region Toggle /// /// Sets a as completed, after which sends , also if the achievment is completed sends a .
- /// If there is no achievment at a given id throws an . If achievment at a given id is of a wrong tupe throws an ///
/// + /// throws an if there is no achievment under id or an if achievment under id is of a different type public void SetToggleAchivment(string id) { ManipulateAchievment(id, (achievment) => achievment.CompletionState = true); @@ -182,9 +183,9 @@ namespace NEG.Utils.Achievments /// /// Gets a completion state from a .
- /// If there is no achievment at a given id throws an . If achievment at a given id is of a wrong tupe throws an ///
/// + /// throws an if there is no achievment under id or an if achievment under id is of a different type public bool GetToggleState(string id) { return GetAchievmentForId(id).CompletionState; @@ -194,9 +195,9 @@ namespace NEG.Utils.Achievments #region Int /// /// Sets progress of a given to , after which sends , also if the achievment is completed sends a .
- /// If there is no achievment at a given id throws an . If achievment at a given id is of a wrong tupe throws an . ///
/// + /// throws an if there is no achievment under id or an if achievment under id is of a different type public void SetIntProgress(string id, int progress) { ManipulateAchievment(id, (achievment) => achievment.CurrentProgress = progress); @@ -204,19 +205,19 @@ namespace NEG.Utils.Achievments /// /// Changes progress of a given by , after which sends , also if the achievment is completed sends a .
- /// If there is no achievment at a given id throws an . If achievment at a given id is of a wrong tupe throws an ///
/// - public void CangeIntProgress(string id, int delta) + /// throws an if there is no achievment under id or an if achievment under id is of a different type + public void ChangeIntProgress(string id, int delta) { ManipulateAchievment(id, (achievment) => achievment.CurrentProgress += delta); } /// /// Gets current progress from a .
- /// If there is no achievment at a given id throws an . If achievment at a given id is of a wrong tupe throws an ///
/// + /// throws an if there is no achievment under id or an if achievment under id is of a different type public int GetIntProgress(string id) { return GetAchievmentForId(id).CurrentProgress; @@ -226,9 +227,9 @@ namespace NEG.Utils.Achievments #region Float /// /// Sets progress of a given to , after which sends , also if the achievment is completed sends a .
- /// If there is no achievment at a given id throws an . If achievment at a given id is of a wrong tupe throws an ///
/// + /// throws an if there is no achievment under id or an if achievment under id is of a different type public void SetFloatProgress(string id, float progress) { ManipulateAchievment(id, (achievment) => achievment.CurrentProgress = progress); @@ -236,19 +237,19 @@ namespace NEG.Utils.Achievments /// /// Changes progress of a given by , after which sends , also if the achievment is completed sends a .
- /// If there is no achievment at a given id throws an . If achievment at a given id is of a wrong tupe throws an ///
/// - public void CangeFloatProgress(string id, float delta) + /// throws an if there is no achievment under id or an if achievment under id is of a different type + public void ChangeFloatProgress(string id, float delta) { ManipulateAchievment(id, (achievment) => achievment.CurrentProgress += delta); } /// /// Gets current progress from a .
- /// If there is no achievment at a given id throws an . If achievment at a given id is of a wrong tupe throws an ///
/// + /// throws an if there is no achievment under id or an if achievment under id is of a different type public float GetFloatProgress(string id) { return GetAchievmentForId(id).CurrentProgress; @@ -261,7 +262,7 @@ namespace NEG.Utils.Achievments /// /// Type of the achievment /// Id of requested achievment - /// throws an if either there is no achievment under id or achievment under id is of a different type + /// throws an if there is no achievment under id or an if achievment under id is of a different type public T GetAchievmentForId(string id) where T : AchievmentData { return ValidateAchievmentType(GetAchievmentForId(id)); @@ -289,7 +290,7 @@ namespace NEG.Utils.Achievments { if (data is not T convetred) { - throw new AchievmentTypeExcetion($"Attempting to perform an operation on an invalid achievment type. Expected {typeof(T)} got {data.GetType()}", data.Achivment.Id, typeof(T), data.GetType()); + throw new AchievmentTypeException($"Attempting to perform an operation on an invalid achievment type. Expected {typeof(T)} got {data.GetType()}", data.Achivment.Id, typeof(T), data.GetType()); } return convetred; } diff --git a/Achievments/Tests/ConfigTests.cs b/Achievments/Tests/ConfigTests.cs index a688b16..832b657 100644 --- a/Achievments/Tests/ConfigTests.cs +++ b/Achievments/Tests/ConfigTests.cs @@ -1,90 +1,380 @@ +using System; using System.Collections; using System.Collections.Generic; using NUnit.Framework; using UnityEngine; using UnityEngine.TestTools; -using NEG.Utils.Achivments; -public class ConfigTests +namespace NEG.Utils.Achievments.Tests { - public const string AchivmentDefOnlyLabel = "TestAchivments"; - public const string AchivmentSetLabel = "TestAchivments"; - public const string AchivmentProgressLabel = "TestAchivments"; + using AchievmentTypes; + using static Internal.Extensions; - public const string NoProgressAchivment = "NO_PROGRESS"; - public const string WithProgressAchivment = "WITH_PROGRESS"; - - [Test] - public void AchivmentDefOnly() + public class ConfigTests { - AchivmentManager manager = AchivmentManager.Builder.FromLabeledConfig(AchivmentDefOnlyLabel).Build(); + public const string AchievmentsLabel = "TestAchivments"; - //Shoud not throw - manager.SetAchivment(NoProgressAchivment); - //Shoud not throw - manager.SetAchivment(WithProgressAchivment); + public const string AchievmentIdToggle = "TOGGLE"; + public const string AchievmentIdInt = "INT"; + public const string AchievmentIdFloat = "FLOAT"; + public const string AchievmentIdInvalid = "huptyrz"; + public const int RandomProgress = 15; + public const int ProgressChangeDelta = 15; + public const int CompletedProgress = 100; + public const int OvershootProgress = 150; + + #region Id And Types + [Test] + public void AchivmentInvalidId() + { + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel).Build(); + + TestInvalidId(AchievmentIdInvalid, (id) => manager.GetAchievmentForId(id), "Get"); + } + + [Test] + public void AchivmentInvalidType() + { + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel).Build(); + + manager.TestInvalidType(AchievmentIdToggle, "Toggle"); + manager.TestInvalidType(AchievmentIdInt, "Int"); + manager.TestInvalidType(AchievmentIdFloat, "Float"); + } + + [Test] + public void AchivmentCorrectIdAndType() + { + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel).Build(); + + manager.TestValidIdAndType(AchievmentIdToggle, "Toggle"); + manager.TestValidIdAndType(AchievmentIdInt, "Int"); + manager.TestValidIdAndType(AchievmentIdFloat, "Float"); + } + #endregion + + #region Toggle + [Test] + public void AchivmentToggleSet() + { + var callbackTester = new TestCallbackRereiver(); + + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel) + .WithCallbackReciever(callbackTester) + .Build(); + + manager.SetToggleAchivment(AchievmentIdToggle); + callbackTester.TestCompleted(AchievmentIdToggle); + callbackTester.Reset(); + + manager.SetToggleAchivment(AchievmentIdToggle); + callbackTester.TestNoChanges(); + } + + #endregion + + #region Int + [Test] + public void AchivmentIntSetLess() + { + var callbackTester = new TestCallbackRereiver(); + + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel) + .WithCallbackReciever(callbackTester) + .Build(); + + //Set progress to some value progress + manager.SetIntProgress(AchievmentIdInt, RandomProgress); + var data = callbackTester.GetChanged(); + + Assert.AreEqual(RandomProgress, data.CurrentProgress); + Assert.IsFalse(data.IsCompleted); + callbackTester.Reset(); + } + + [Test] + public void AchivmentIntSetEqual() + { + var callbackTester = new TestCallbackRereiver(); + + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel) + .WithCallbackReciever(callbackTester) + .Build(); + + //Set progress to some value equal to required value + manager.SetIntProgress(AchievmentIdInt, CompletedProgress); + var data = callbackTester.GetChanged(); + Assert.AreEqual(CompletedProgress, data.CurrentProgress); + callbackTester.TestCompleted(AchievmentIdInt); + callbackTester.Reset(); + + //Do that again, this time nothing sould change + manager.SetIntProgress(AchievmentIdInt, CompletedProgress); + callbackTester.TestNoChanges(); + callbackTester.Reset(); + + } + + [Test] + public void AchivmentIntSetGreater() + { + var callbackTester = new TestCallbackRereiver(); + + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel) + .WithCallbackReciever(callbackTester) + .Build(); + + //Set progress to some value greater than required + manager.SetIntProgress(AchievmentIdInt, OvershootProgress); + var data = callbackTester.GetChanged(); + //Testing against completed progress, should be clamped down + Assert.AreEqual(CompletedProgress, data.CurrentProgress); + callbackTester.TestCompleted(AchievmentIdInt); + callbackTester.Reset(); + + //Do that again, this time nothing sould change + manager.SetIntProgress(AchievmentIdInt, OvershootProgress); + callbackTester.TestNoChanges(); + callbackTester.Reset(); + } + + [Test] + public void AchivmentIntChangeCompletion() + { + var callbackTester = new TestCallbackRereiver(); + + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel) + .WithCallbackReciever(callbackTester) + .Build(); + + //Add progresss one interval below completion + for (int i = 0; i < CompletedProgress / ProgressChangeDelta; i++) + { + manager.ChangeIntProgress(AchievmentIdInt, ProgressChangeDelta); + callbackTester.TestNotCompleted(); + var changed = callbackTester.GetChanged(); + + Assert.AreEqual((i + 1) * ProgressChangeDelta, changed.CurrentProgress); + callbackTester.Reset(); + } + + //Add progress one more time, should now be completed + manager.ChangeIntProgress(AchievmentIdInt, ProgressChangeDelta); + var changed1 = callbackTester.GetChanged(); + Assert.AreEqual(CompletedProgress, changed1.CurrentProgress); + callbackTester.TestCompleted(AchievmentIdInt); + callbackTester.Reset(); + + //Do that again, this time nothing should change + manager.ChangeIntProgress(AchievmentIdInt, ProgressChangeDelta); + callbackTester.TestNoChanges(); + callbackTester.Reset(); + + //Do that again, but down this time also nothing should change + manager.ChangeIntProgress(AchievmentIdInt, -ProgressChangeDelta); + callbackTester.TestNoChanges(); + callbackTester.Reset(); + } + #endregion + + #region Float + [Test] + public void AchivmentFloatSetLess() + { + var callbackTester = new TestCallbackRereiver(); + + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel) + .WithCallbackReciever(callbackTester) + .Build(); + + //Set progress to some value progress + manager.SetFloatProgress(AchievmentIdFloat, RandomProgress); + var data = callbackTester.GetChanged(); + + Assert.AreEqual((float)RandomProgress, data.CurrentProgress); + Assert.IsFalse(data.IsCompleted); + callbackTester.Reset(); + } + + [Test] + public void AchivmentFloatSetEqual() + { + var callbackTester = new TestCallbackRereiver(); + + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel) + .WithCallbackReciever(callbackTester) + .Build(); + + //Set progress to some value equal to required value + manager.SetFloatProgress(AchievmentIdFloat, CompletedProgress); + var data = callbackTester.GetChanged(); + Assert.AreEqual((float)CompletedProgress, data.CurrentProgress); + callbackTester.TestCompleted(AchievmentIdFloat); + callbackTester.Reset(); + + //Do that again, this time nothing sould change + manager.SetFloatProgress(AchievmentIdFloat, CompletedProgress); + callbackTester.TestNoChanges(); + callbackTester.Reset(); + + } + + [Test] + public void AchivmentFloatSetGreater() + { + var callbackTester = new TestCallbackRereiver(); + + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel) + .WithCallbackReciever(callbackTester) + .Build(); + + //Set progress to some value greater than required + manager.SetFloatProgress(AchievmentIdFloat, OvershootProgress); + var data = callbackTester.GetChanged(); + //Testing against completed progress, should be clamped down + Assert.AreEqual((float)CompletedProgress, data.CurrentProgress); + callbackTester.TestCompleted(AchievmentIdFloat); + callbackTester.Reset(); + + //Do that again, this time nothing sould change + manager.SetFloatProgress(AchievmentIdFloat, OvershootProgress); + callbackTester.TestNoChanges(); + callbackTester.Reset(); + } + + [Test] + public void AchivmentFloatChangeCompletion() + { + var callbackTester = new TestCallbackRereiver(); + + AchievmentManager manager = AchievmentManager.Builder.FromLabeledConfig(AchievmentsLabel) + .WithCallbackReciever(callbackTester) + .Build(); + + //Add progresss one interval below completion + for (int i = 0; i < CompletedProgress / ProgressChangeDelta; i++) + { + manager.ChangeFloatProgress(AchievmentIdFloat, ProgressChangeDelta); + callbackTester.TestNotCompleted(); + var changed = callbackTester.GetChanged(); + + Assert.AreEqual((i + 1) * ProgressChangeDelta, changed.CurrentProgress, 0.0f); + callbackTester.Reset(); + } + + //Add progress one more time, should now be completed + manager.ChangeFloatProgress(AchievmentIdFloat, ProgressChangeDelta); + var changed1 = callbackTester.GetChanged(); + Assert.AreEqual((float)CompletedProgress, changed1.CurrentProgress); + callbackTester.TestCompleted(AchievmentIdFloat); + callbackTester.Reset(); + + //Do that again, this time nothing should change + manager.ChangeFloatProgress(AchievmentIdFloat, ProgressChangeDelta); + callbackTester.TestNoChanges(); + callbackTester.Reset(); + + //Do that again, but down this time also nothing should change + manager.ChangeFloatProgress(AchievmentIdFloat, -ProgressChangeDelta); + callbackTester.TestNoChanges(); + callbackTester.Reset(); + } + #endregion + + private class TestCallbackRereiver : IAchievmentCallbackReciever + { + public AchievmentData LastDataUpdated { get; private set; } = null; + public Type LastTypeSet { get; private set; } = null; + public string LastIdSet { get; private set; } = null; + + public void Reset() + { + LastDataUpdated = null; + LastTypeSet = null; + LastIdSet = null; + } + + public T GetChanged() where T : AchievmentData + { + Assert.IsInstanceOf(typeof(T), LastDataUpdated); + + return (T)LastDataUpdated; + } + + public void TestNoChanges() + { + Assert.IsNull(LastDataUpdated); + Assert.IsNull(LastTypeSet); + Assert.IsNull(LastIdSet); + } + + public void TestNotCompleted() + { + //No need to also check LastTypeSet, they are both set or bot null + Assert.IsNull(LastIdSet); + } + + public void TestCompleted(string id) + { + Assert.AreEqual(typeof(Type), LastTypeSet); + Assert.AreEqual(id, LastIdSet); + //Shold not be null: if we axpect achievment to be completed it must have also been updated + Assert.IsTrue(LastDataUpdated.IsCompleted); + } + + public void AchievmentCompleted(AchievmentData achievment) + { + LastTypeSet = achievment.GetType(); + LastIdSet = achievment.Achivment.Id; + } + + public void AchievmentStateChanged(AchievmentData achievment) + { + LastDataUpdated = achievment; + } + } } - [Test] - public void AchivmentSet() + namespace Internal { - var callbackTester = new TestCallbackRereiver(); + public static class Extensions + { + public static void TestValidIdAndType(this AchievmentManager manager, string id, string testName) where Type : AchievmentData + { + TestValidIdAndType(id, (id) => manager.GetAchievmentForId(id), testName); + } - AchivmentManager manager = AchivmentManager.Builder.FromLabeledConfig(AchivmentDefOnlyLabel) - .WithCallbackReciever(callbackTester) - .Build(); + public static void TestValidIdAndType(string id, Action manipulation, string testName) + { + Assert.DoesNotThrow(() => manipulation(id), $"{testName}: Invalid type or id"); + } - //Shoud not throw - manager.SetAchivment(NoProgressAchivment); + public static void TestInvalidId(this AchievmentManager manager, string id, string testName) + { + TestInvalidId(id, (id) => manager.GetAchievmentForId(id), testName); + } - //Shoud not throw - manager.SetAchivment(WithProgressAchivment); - } + public static void TestInvalidId(string id, Action manipulation, string testName) + { + var exception = Assert.Throws(() => manipulation(id), $"Expected to fail with {typeof(AchievmentTypeException)}"); - [Test] - public void AchivmentProgress() - { - AchivmentManager manager = AchivmentManager.Builder.FromLabeledConfig(AchivmentProgressLabel).Build(); - } + Assert.AreEqual(exception.Id, id, $"{testName}: Achievment id does not match"); + } - private class TestCallbackRereiver : IAchivmentCallbackReciever - { - public int LastProgressUpdated { get; private set; } = -1; - public string LastIdUpdated { get; private set; } = null; - public string LastIdSet { get; private set; } = null; + public static void TestInvalidType(this AchievmentManager manager, string id, string testName) where Expected : AchievmentData where Actual : AchievmentData + { + TestInvalidType(id, (id) => manager.GetAchievmentForId(id), testName); + } + + public static void TestInvalidType(string id, Action manipulation, string testName) where Expected : AchievmentData where Actual : AchievmentData + { + var exception = Assert.Throws(() => manipulation(id), $"Expected to fail with {typeof(AchievmentTypeException)}"); - public void SetAchivment(AchivmentData achivment) - { - LastIdSet = achivment.Achivment.Id; - } + Assert.AreEqual(id, exception.Id, $"{testName}: Achievment id does not match"); + Assert.AreSame(typeof(Expected), exception.Expected, $"{testName}: Target achievment type does not match"); + Assert.AreSame(typeof(Actual), exception.Actual, $"{testName}: Actual achievment type does not match"); + } - public void SetAchivmentProgress(AchivmentData achivment, int progress) - { - LastIdUpdated = achivment.Achivment.Id; - LastProgressUpdated = progress; - } - - public void Reset() - { - LastIdSet = null; - LastIdUpdated = null; - LastProgressUpdated = -1; - } - - public void TestSetCallbackst(AchivmentManager manager, string id) - { - manager.SetAchivment(id); - Assert.AreEqual(id, LastIdSet); - Assert.AreEqual(null, LastIdUpdated); - Assert.AreEqual(-1, LastProgressUpdated); - } - - public void TestProgressCallback(AchivmentManager manager, string id, int progress, int expectedProgress, bool shouldSet) - { - manager.AddProgress(id, progress); - //Assert.AreEqual(, LastIdSet); - Assert.AreEqual(null, LastIdUpdated); - Assert.AreEqual(-1, LastProgressUpdated); } } -} +} \ No newline at end of file diff --git a/Achievments/Tests/TestAssets/AchivmentCollection.asset b/Achievments/Tests/TestAssets/AchivmentCollection.asset index 19ed1a9..25bd3ce 100644 --- a/Achievments/Tests/TestAssets/AchivmentCollection.asset +++ b/Achievments/Tests/TestAssets/AchivmentCollection.asset @@ -13,5 +13,6 @@ MonoBehaviour: m_Name: AchivmentCollection m_EditorClassIdentifier: k__BackingField: - - {fileID: 11400000, guid: 553d34779f9a31d4891686d6d34e8033, type: 2} - - {fileID: 11400000, guid: adbb4fd3d7472eb49933ac9958d499ff, type: 2} + - {fileID: 11400000, guid: 7734df2e5d4033346aac56f0a2b2a836, type: 2} + - {fileID: 11400000, guid: c704b1ea2247ad540842a9caff628211, type: 2} + - {fileID: 11400000, guid: c71840de74e747e45afc82ecf8922dcd, type: 2} diff --git a/Achievments/Tests/TestAssets/Float.asset b/Achievments/Tests/TestAssets/Float.asset new file mode 100644 index 0000000..8d39d71 --- /dev/null +++ b/Achievments/Tests/TestAssets/Float.asset @@ -0,0 +1,18 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d7270d5452c9b04ca07ef43a491a18d, type: 3} + m_Name: Float + m_EditorClassIdentifier: + k__BackingField: FLOAT + k__BackingField: 100 + k__BackingField: 0 + k__BackingField: 0 diff --git a/Achievments/Tests/TestAssets/NoProgress.asset.meta b/Achievments/Tests/TestAssets/Float.asset.meta similarity index 79% rename from Achievments/Tests/TestAssets/NoProgress.asset.meta rename to Achievments/Tests/TestAssets/Float.asset.meta index f005e8f..326ee38 100644 --- a/Achievments/Tests/TestAssets/NoProgress.asset.meta +++ b/Achievments/Tests/TestAssets/Float.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 553d34779f9a31d4891686d6d34e8033 +guid: 7734df2e5d4033346aac56f0a2b2a836 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Achievments/Tests/TestAssets/WithProgress.asset b/Achievments/Tests/TestAssets/Int.asset similarity index 64% rename from Achievments/Tests/TestAssets/WithProgress.asset rename to Achievments/Tests/TestAssets/Int.asset index d343175..5e61751 100644 --- a/Achievments/Tests/TestAssets/WithProgress.asset +++ b/Achievments/Tests/TestAssets/Int.asset @@ -9,9 +9,10 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f9bd42dd58472044b8ecc0d69caa7da8, type: 3} - m_Name: WithProgress + m_Script: {fileID: 11500000, guid: 5318fea685aa56646a3310c38a9a9bac, type: 3} + m_Name: Int m_EditorClassIdentifier: - k__BackingField: WITH_PROGRESS + k__BackingField: INT k__BackingField: 100 - additionalDataInitializer: + k__BackingField: 0 + k__BackingField: 0 diff --git a/Achievments/Tests/TestAssets/WithProgress.asset.meta b/Achievments/Tests/TestAssets/Int.asset.meta similarity index 79% rename from Achievments/Tests/TestAssets/WithProgress.asset.meta rename to Achievments/Tests/TestAssets/Int.asset.meta index cec1de2..b89ba06 100644 --- a/Achievments/Tests/TestAssets/WithProgress.asset.meta +++ b/Achievments/Tests/TestAssets/Int.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: adbb4fd3d7472eb49933ac9958d499ff +guid: c704b1ea2247ad540842a9caff628211 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Achievments/Tests/TestAssets/NoProgress.asset b/Achievments/Tests/TestAssets/Toggle.asset similarity index 59% rename from Achievments/Tests/TestAssets/NoProgress.asset rename to Achievments/Tests/TestAssets/Toggle.asset index e186a84..afd65bb 100644 --- a/Achievments/Tests/TestAssets/NoProgress.asset +++ b/Achievments/Tests/TestAssets/Toggle.asset @@ -9,9 +9,7 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f9bd42dd58472044b8ecc0d69caa7da8, type: 3} - m_Name: NoProgress + m_Script: {fileID: 11500000, guid: 608c7e921b8b16b42919fc6f55b67fcb, type: 3} + m_Name: Toggle m_EditorClassIdentifier: - k__BackingField: NO_PROGRESS - k__BackingField: 1 - additionalDataInitializer: + k__BackingField: TOGGLE diff --git a/Achievments/Tests/TestAssets/Toggle.asset.meta b/Achievments/Tests/TestAssets/Toggle.asset.meta new file mode 100644 index 0000000..ca5f86a --- /dev/null +++ b/Achievments/Tests/TestAssets/Toggle.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c71840de74e747e45afc82ecf8922dcd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: