public override void OnEnter()
        {
            for (int i = 0; i < keys.Length; i++)
            {
                if (!keys[i].IsNone || !keys[i].Value.Equals(""))
                {
                    string key    = keys[i].Value;
                    FsmVar fsmVar = values[i];

                    switch (fsmVar.Type)
                    {
                    case VariableType.Int:
                        PlayerPrefs.SetInt(key, fsmVar.IsNone ? 0 : (int)PlayMakerUtils.GetValueFromFsmVar(this.Fsm, fsmVar));
                        break;

                    case VariableType.Float:
                        PlayerPrefs.SetFloat(key, fsmVar.IsNone ? 0f : (float)PlayMakerUtils.GetValueFromFsmVar(this.Fsm, fsmVar));
                        break;

                    case VariableType.Bool:
                        PlayerPrefsX.SetBool(key, fsmVar.IsNone ? false : (bool)PlayMakerUtils.GetValueFromFsmVar(this.Fsm, fsmVar));
                        break;

                    case VariableType.Color:
                        PlayerPrefsX.SetColor(key, fsmVar.IsNone ? Color.black : (Color)PlayMakerUtils.GetValueFromFsmVar(this.Fsm, fsmVar));
                        break;

                    case VariableType.Quaternion:
                        PlayerPrefsX.SetQuaternion(key, fsmVar.IsNone ? Quaternion.identity : (Quaternion)PlayMakerUtils.GetValueFromFsmVar(this.Fsm, fsmVar));
                        break;

                    case VariableType.Rect:
                        PlayerPrefsX.SetRect(key, fsmVar.IsNone ? new Rect(0f, 0f, 0f, 0f) : (Rect)PlayMakerUtils.GetValueFromFsmVar(this.Fsm, fsmVar));
                        break;

                    case VariableType.Vector2:
                        PlayerPrefsX.SetVector2(key, fsmVar.IsNone ? Vector2.zero : (Vector2)PlayMakerUtils.GetValueFromFsmVar(this.Fsm, fsmVar));
                        break;

                    case VariableType.Vector3:
                        PlayerPrefsX.SetVector3(key, fsmVar.IsNone ? Vector3.zero : (Vector3)PlayMakerUtils.GetValueFromFsmVar(this.Fsm, fsmVar));
                        break;

                    case VariableType.String:
                        PlayerPrefs.SetString(key, fsmVar.IsNone ? "" : (string)PlayMakerUtils.GetValueFromFsmVar(this.Fsm, fsmVar));
                        break;

                    default:
                        LogError("PlayerPrefsx does not support saving " + fsmVar.Type);
                        break;
                    }
                }
            }

            Finish();
        }