public void LoadButton() { var data = SaveData.Load <Datas>(PLAYERDATA); if (data == null) { return; } player.data = data; player.Load(); }
/// <summary> /// 表示を初期化. /// </summary> private void Initialized() { datas = SaveData.Load <Datas>(DataKey); if (datas == null) { playTimeText.text = "\nNo Data"; } else { playTimeText.text = "\n" + datas.GetPlayTime(); } }
// Update is called once per frame void Update() { try { text.text = "PlayerPos: " + player.transform.position + "\n" + "DataPos: " + SaveData.Load <Datas>("data").location + "\n"; } catch { text.text = "PlayerPos: " + player.transform.position + "\n" + "DataPos: " + Vector3.zero + "\n"; } }