﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SppCredentialBehaviour : MonoBehaviour {
	public SppLoginData loginData;
	public bool autoSave = true;

	void Awake () {
        if (autoSave)
        {
            OnDisable();
            OnEnable();
        }
		loginData = SppConfig.loginData;
	}

	void OnEnable()   {
		if (autoSave == true) {
			loginData.Load ();
		}	
	}	

	void OnDisable()   {
		if (autoSave == true) {
			loginData.Save ();
		}	
	}	
}
