Closes #109 UserPlayData Link With Google Drive

This commit is contained in:
IDMhan 2024-01-24 11:08:45 +09:00
parent 10209fbd4a
commit ee14717140
27 changed files with 11842 additions and 3 deletions

View File

@ -1454,7 +1454,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 107368052}
serializedVersion: 2
m_LocalRotation: {x: 0.38268343, y: 1e-45, z: -0, w: 0.92387956}
m_LocalRotation: {x: 0.38268343, y: 1e-45, z: -1e-45, w: 0.92387956}
m_LocalPosition: {x: 5.22, y: 11.1380005, z: -4.18}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -6425,7 +6425,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 501722143}
serializedVersion: 2
m_LocalRotation: {x: 0.38268343, y: 1e-45, z: 0, w: 0.92387956}
m_LocalRotation: {x: 0.38268343, y: 1e-45, z: -1e-45, w: 0.92387956}
m_LocalPosition: {x: 5.22, y: 11.1380005, z: -4.18}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -16618,6 +16618,7 @@ GameObject:
m_Component:
- component: {fileID: 1426193642}
- component: {fileID: 1426193641}
- component: {fileID: 1426193643}
m_Layer: 0
m_Name: DataManager
m_TagString: Untagged
@ -16689,6 +16690,18 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1426193643
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1426193640}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9141f4ec2de5d4b13b4f7bb92b117a43, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1439570250
GameObject:
m_ObjectHideFlags: 0
@ -18604,6 +18617,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1671439082}
- component: {fileID: 1671439083}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
@ -18626,6 +18640,24 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1671439083
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1671439081}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 75aa5d7515c5b4d38bc7b3f428339f5c, type: 3}
m_Name:
m_EditorClassIdentifier:
_persistent: 0
<IslandPlayerMode>k__BackingField: 0
<InIslandPlayerPrefab>k__BackingField: {fileID: 0}
<CrewmatePrefabList>k__BackingField: []
<CurrentCrewmateList>k__BackingField: []
slowSpeed: 0.1
--- !u!1 &1674640619
GameObject:
m_ObjectHideFlags: 0

View File

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;
@ -43,8 +44,12 @@ namespace BlueWaterProject
protected override void OnAwake()
{
Init();
if (gameObject.GetComponent<Upd>() == null)
{
gameObject.AddComponent<Upd>();
}
}
/// <summary>
/// Dictionary 초기화 함수
/// </summary>

View File

@ -0,0 +1,84 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Networking;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
[System.Serializable]
public class GoogleData
{
public string order, result, msg;
}
public class Upd : MonoBehaviour
{
const string URL = "https://script.google.com/macros/s/AKfycbxRZe-YsV-Yy43VI-fsLxXZ7qLXkf9Dw-RBzPUH3JDH-ZeucGHQx6kX-to-mnbYBkEizA/exec";
private GoogleData GD;
TimeSpan startTime;
private void Start()
{
startTime = System.DateTime.Now.TimeOfDay;
Register();
}
public void Register()
{
var deviceUniqueIdentifier = SystemInfo.deviceUniqueIdentifier; // 기기 고유 식별자
var date = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); // 현재 날짜
var processorType = SystemInfo.processorType; // CPU
var graphicsDeviceName = SystemInfo.graphicsDeviceName; // GPU
var systemMemorySize = (SystemInfo.systemMemorySize / 1024).ToString() + "GB"; // 시스템 메모리 크기
var playTime = System.DateTime.Now.TimeOfDay - startTime;
var form = new WWWForm();
form.AddField("order", "register");
form.AddField("id", deviceUniqueIdentifier);
form.AddField("date", date);
form.AddField("cpu", processorType);
form.AddField("gpu", graphicsDeviceName);
form.AddField("memory", systemMemorySize);
form.AddField("playtime", playTime.ToString());
StartCoroutine(Post(form));
}
IEnumerator Post(WWWForm form)
{
using UnityWebRequest www = UnityWebRequest.Post(URL, form);
yield return www.SendWebRequest();
if (www.isDone) Response(www.downloadHandler.text);
else print("웹의 응답이 없습니다.");
}
void Response(string json)
{
if (string.IsNullOrEmpty(json)) return;
GD = JsonUtility.FromJson<GoogleData>(json);
if (GD.result == "ERROR")
{
print(GD.order + "을 실행할 수 없습니다. 에러 메시지 : " + GD.msg);
return;
}
//print(GD.order + "을 실행했습니다. 메시지 : " + GD.msg);
}
void RemoveCache()
{
var form = new WWWForm();
form.AddField("order", "removeCache");
StartCoroutine(Post(form));
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9141f4ec2de5d4b13b4f7bb92b117a43

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<disabledPackageSources />
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<config>
<add key="repositoryPath" value="./Packages" />
<add key="PackagesConfigDirectoryPath" value="." />
<add key="slimRestore" value="true" />
</config>
</configuration>

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: abbad0c29df71403d833e74569055940

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 51aaa7f846fb8479299021ced4a9917d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e03bcc633f41d40458e1059566cbd7a3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2007 James Newton-King
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a7fbf57eafb4c470a91f1d3de2705ebf
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>Newtonsoft.Json</id>
<version>13.0.3</version>
<title>Json.NET</title>
<authors>James Newton-King</authors>
<license type="expression">MIT</license>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<icon>packageIcon.png</icon>
<readme>README.md</readme>
<projectUrl>https://www.newtonsoft.com/json</projectUrl>
<iconUrl>https://www.newtonsoft.com/content/images/nugeticon.png</iconUrl>
<description>Json.NET is a popular high-performance JSON framework for .NET</description>
<copyright>Copyright © James Newton-King 2008</copyright>
<tags>json</tags>
<repository type="git" url="https://github.com/JamesNK/Newtonsoft.Json" commit="0a2e291c0d9c0c7675d445703e51750363a549ef" />
<dependencies>
<group targetFramework=".NETFramework2.0" />
<group targetFramework=".NETFramework3.5" />
<group targetFramework=".NETFramework4.0" />
<group targetFramework=".NETFramework4.5" />
<group targetFramework=".NETStandard1.0">
<dependency id="Microsoft.CSharp" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
<dependency id="System.ComponentModel.TypeConverter" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="System.Runtime.Serialization.Primitives" version="4.3.0" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard1.3">
<dependency id="Microsoft.CSharp" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
<dependency id="System.ComponentModel.TypeConverter" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="System.Runtime.Serialization.Formatters" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="System.Runtime.Serialization.Primitives" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="System.Xml.XmlDocument" version="4.3.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0" />
<group targetFramework=".NETStandard2.0" />
</dependencies>
</metadata>
</package>

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bb06370aebf0b4f1684f9468eb098d4c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,71 @@
# ![Logo](https://raw.githubusercontent.com/JamesNK/Newtonsoft.Json/master/Doc/icons/logo.jpg) Json.NET
[![NuGet version (Newtonsoft.Json)](https://img.shields.io/nuget/v/Newtonsoft.Json.svg?style=flat-square)](https://www.nuget.org/packages/Newtonsoft.Json/)
[![Build status](https://dev.azure.com/jamesnk/Public/_apis/build/status/JamesNK.Newtonsoft.Json?branchName=master)](https://dev.azure.com/jamesnk/Public/_build/latest?definitionId=8)
Json.NET is a popular high-performance JSON framework for .NET
## Serialize JSON
```csharp
Product product = new Product();
product.Name = "Apple";
product.Expiry = new DateTime(2008, 12, 28);
product.Sizes = new string[] { "Small" };
string json = JsonConvert.SerializeObject(product);
// {
// "Name": "Apple",
// "Expiry": "2008-12-28T00:00:00",
// "Sizes": [
// "Small"
// ]
// }
```
## Deserialize JSON
```csharp
string json = @"{
'Name': 'Bad Boys',
'ReleaseDate': '1995-4-7T00:00:00',
'Genres': [
'Action',
'Comedy'
]
}";
Movie m = JsonConvert.DeserializeObject<Movie>(json);
string name = m.Name;
// Bad Boys
```
## LINQ to JSON
```csharp
JArray array = new JArray();
array.Add("Manual text");
array.Add(new DateTime(2000, 5, 23));
JObject o = new JObject();
o["MyArray"] = array;
string json = o.ToString();
// {
// "MyArray": [
// "Manual text",
// "2000-05-23T00:00:00"
// ]
// }
```
## Links
- [Homepage](https://www.newtonsoft.com/json)
- [Documentation](https://www.newtonsoft.com/json/help)
- [NuGet Package](https://www.nuget.org/packages/Newtonsoft.Json)
- [Release Notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Contributing Guidelines](https://github.com/JamesNK/Newtonsoft.Json/blob/master/CONTRIBUTING.md)
- [License](https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/json.net)

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 65a119121c5a146568dc99f845ff11aa
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3138cf2fec43d4566b196f3ba560d9ee
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 70b414541c98244d1859302cb721c8e9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: edb959977973d404d9cdf61669e7c084

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 129415eea02bd4572a228a33a6d6c0ee
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 3b069d7e665df450dbfcd360ec186df4
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="13.0.3" manuallyInstalled="true" />
</packages>

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f614c97d826094bb3afef5ef7d8ce6bf

View File

@ -1,5 +1,6 @@
{
"dependencies": {
"com.github-glitchenzo.nugetforunity": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity",
"com.unity.2d.animation": "10.0.3",
"com.unity.2d.sprite": "1.0.0",
"com.unity.addressables": "1.21.18",

View File

@ -7,6 +7,13 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.github-glitchenzo.nugetforunity": {
"version": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity",
"depth": 0,
"source": "git",
"dependencies": {},
"hash": "7388d28922b2144497f639630fd8b8b7a3c1ee6d"
},
"com.singularitygroup.hotreload": {
"version": "file:com.singularitygroup.hotreload",
"depth": 0,