예제 #1
0
        //データを解析してフラグメントを作成
        public void SetFragmentsData(string json)
        {
            DestroyAllFragment();
            HomographySaveFormat hsf = JsonUtility.FromJson <HomographySaveFormat> (json);

            if (hsf.CreateFragmentListFromSaveData(this))
            {
                return;
            }
            else
            {
                Debug.Log("データが破損しています。");
            }
        }
예제 #2
0
        //セーブ用のデータを作成
        public string GetFragmentsData()
        {
            string json = null;
            HomographySaveFormat hsf = new HomographySaveFormat();

            if (hsf.CreateSaveDataFromFragmentList(this))
            {
                json = JsonUtility.ToJson(hsf, true);
            }
            else
            {
                Debug.Log("セーブデータが生成できませんでした。");
            }

            Debug.Log(json);
            return(json);
        }