示例#1
0
        public void GivenForString_WhenGet_ThenStringRetrieved()
        {
            var expected = "someOldValue";

            PlayerPrefs.SetString(TestKey, expected);

            var actual = PowerPrefs.ForString().Get(TestKey, "");

            Assert.That(actual, Is.EqualTo(expected));
        }
示例#2
0
        public void GivenForString_WhenSet_ThenStringStored()
        {
            var expected = "someNewValue";

            PlayerPrefs.SetString(TestKey, "someOldValue");

            PowerPrefs.ForString().Set(TestKey, expected);

            Assert.That(PlayerPrefs.GetString(TestKey, ""), Is.EqualTo(expected));
        }
 public void InputValueChanged(string input)
 {
     PowerPrefs.ForString().Set(KeyInput, input);
 }
        void Awake()
        {
            var inputValue = PowerPrefs.ForString().Get(KeyInput, "Default");

            inputField.text = inputValue;
        }