테스트용 데이터 저장,불러오기 기능 작업완료
This commit is contained in:
parent
48f3104d57
commit
75df2daeb2
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 823dd90aa3a182448887a40970fed451
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class ExcelDatas
|
||||||
|
{
|
||||||
|
public Dictionary<long,시트1> 시트1;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 885ba014193a93b49996d492326704db
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class 시트1
|
||||||
|
{
|
||||||
|
public int index;
|
||||||
|
public string test1;
|
||||||
|
public int test2;
|
||||||
|
public testenums test3;
|
||||||
|
public string test4;
|
||||||
|
public DateTime test5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum testenums
|
||||||
|
{
|
||||||
|
none = 0,
|
||||||
|
aaa,
|
||||||
|
bbb,
|
||||||
|
ccc,
|
||||||
|
ddd
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9c454a55bab0dc44f93be09ba4a2851f
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
using UnityEngine.SceneManagement;
|
using Newtonsoft.Json;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using UnityEditor.UIElements;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
public class GameManager : DontDestroy<GameManager>
|
public class GameManager : DontDestroy<GameManager>
|
||||||
{
|
{
|
||||||
|
|
@ -7,6 +10,27 @@ public class GameManager : DontDestroy<GameManager>
|
||||||
public eScene NowScene;
|
public eScene NowScene;
|
||||||
public bool Over;
|
public bool Over;
|
||||||
|
|
||||||
|
protected override void OnStart()
|
||||||
|
{
|
||||||
|
DownlodeResp request = new DownlodeResp();
|
||||||
|
request.Request((data) =>
|
||||||
|
{
|
||||||
|
Statics.excelDatas = JsonConvert.DeserializeObject<ExcelDatas>(Crypto.Instance.Decompress(data.data));
|
||||||
|
Statics.version = data.version;
|
||||||
|
foreach (var item in Statics.excelDatas.시트1)
|
||||||
|
{
|
||||||
|
string newdata = "\n";
|
||||||
|
newdata += $"index : {item.Value.index}\n";
|
||||||
|
newdata += $"test1 : {item.Value.test1}\n";
|
||||||
|
newdata += $"test2 : {item.Value.test2}\n";
|
||||||
|
newdata += $"test3 : {item.Value.test3}\n";
|
||||||
|
newdata += $"test4 : {item.Value.test4}\n";
|
||||||
|
newdata += $"test5 : {item.Value.test5}\n";
|
||||||
|
UnityEngine.Debug.Log($"data : {newdata}");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//public float x = 2160f;
|
//public float x = 2160f;
|
||||||
//public float y = 1080f;
|
//public float y = 1080f;
|
||||||
//현재 등록되어 있는 Scene을 입력하면 현재 열려있는 씬이 무엇인지 NowScene을 통해 알 수 있게됩니다.
|
//현재 등록되어 있는 Scene을 입력하면 현재 열려있는 씬이 무엇인지 NowScene을 통해 알 수 있게됩니다.
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,6 @@ public class Statics
|
||||||
|
|
||||||
public static string version = "";
|
public static string version = "";
|
||||||
|
|
||||||
|
public static ExcelDatas excelDatas;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue