com.backnd.database 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,9 +12,6 @@ namespace BACKND.Database.Editor
|
|
|
12
12
|
private const string SourceFolderName = "TheBackend~";
|
|
13
13
|
private const string TargetFolderName = "TheBackend";
|
|
14
14
|
|
|
15
|
-
private const string InstalledPrefsKey = "BACKND_Database_PluginsInstalled";
|
|
16
|
-
private const string SkippedPrefsKey = "BACKND_Database_PluginsSkipped";
|
|
17
|
-
|
|
18
15
|
static PackageAssetInstaller()
|
|
19
16
|
{
|
|
20
17
|
EditorApplication.delayCall += TryInstallAssets;
|
|
@@ -22,20 +19,11 @@ namespace BACKND.Database.Editor
|
|
|
22
19
|
|
|
23
20
|
private static void TryInstallAssets()
|
|
24
21
|
{
|
|
25
|
-
// 이미 설치 완료 또는 스킵한 경우
|
|
26
|
-
if (EditorPrefs.GetBool(InstalledPrefsKey, false) ||
|
|
27
|
-
EditorPrefs.GetBool(SkippedPrefsKey, false))
|
|
28
|
-
{
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
22
|
string targetPath = Path.Combine("Assets", TargetFolderName);
|
|
33
23
|
|
|
34
|
-
// 이미
|
|
35
|
-
// 핵심 파일들이 모두 존재하는지 확인
|
|
24
|
+
// 이미 설치 완료된 경우
|
|
36
25
|
if (IsAlreadyInstalled(targetPath))
|
|
37
26
|
{
|
|
38
|
-
EditorPrefs.SetBool(InstalledPrefsKey, true);
|
|
39
27
|
return;
|
|
40
28
|
}
|
|
41
29
|
|
|
@@ -48,29 +36,8 @@ namespace BACKND.Database.Editor
|
|
|
48
36
|
return;
|
|
49
37
|
}
|
|
50
38
|
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
"BACKND Database",
|
|
54
|
-
"BACKND SDK 플러그인을 설치하시겠습니까?\n\n" +
|
|
55
|
-
"이 플러그인은 BACKND Database 패키지 사용에 필요합니다.\n\n" +
|
|
56
|
-
$"설치 위치: Assets/{TargetFolderName}",
|
|
57
|
-
"설치",
|
|
58
|
-
"나중에",
|
|
59
|
-
"다시 묻지 않기"
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
switch (result)
|
|
63
|
-
{
|
|
64
|
-
case 0: // 설치
|
|
65
|
-
InstallAssets(sourcePath, targetPath);
|
|
66
|
-
break;
|
|
67
|
-
case 1: // 나중에
|
|
68
|
-
// 다음 에디터 실행 시 다시 물음
|
|
69
|
-
break;
|
|
70
|
-
case 2: // 다시 묻지 않기
|
|
71
|
-
EditorPrefs.SetBool(SkippedPrefsKey, true);
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
39
|
+
// 자동 설치
|
|
40
|
+
InstallAssets(sourcePath, targetPath);
|
|
74
41
|
}
|
|
75
42
|
|
|
76
43
|
private static bool IsAlreadyInstalled(string targetPath)
|
|
@@ -145,17 +112,8 @@ namespace BACKND.Database.Editor
|
|
|
145
112
|
|
|
146
113
|
AssetDatabase.Refresh();
|
|
147
114
|
|
|
148
|
-
EditorPrefs.SetBool(InstalledPrefsKey, true);
|
|
149
|
-
|
|
150
115
|
EditorUtility.ClearProgressBar();
|
|
151
116
|
|
|
152
|
-
EditorUtility.DisplayDialog(
|
|
153
|
-
"BACKND Database",
|
|
154
|
-
"플러그인 설치가 완료되었습니다!\n\n" +
|
|
155
|
-
$"설치 위치: {targetPath}",
|
|
156
|
-
"확인"
|
|
157
|
-
);
|
|
158
|
-
|
|
159
117
|
Debug.Log($"[BACKND Database] 플러그인이 설치되었습니다: {targetPath}");
|
|
160
118
|
}
|
|
161
119
|
catch (System.Exception e)
|
|
@@ -205,7 +163,7 @@ namespace BACKND.Database.Editor
|
|
|
205
163
|
}
|
|
206
164
|
|
|
207
165
|
// 메뉴에서 수동 설치
|
|
208
|
-
[MenuItem("
|
|
166
|
+
[MenuItem("The Backend/Database/Install SDK Plugins")]
|
|
209
167
|
private static void ManualInstall()
|
|
210
168
|
{
|
|
211
169
|
string sourcePath = FindSourcePath();
|
|
@@ -239,13 +197,5 @@ namespace BACKND.Database.Editor
|
|
|
239
197
|
InstallAssets(sourcePath, targetPath);
|
|
240
198
|
}
|
|
241
199
|
|
|
242
|
-
// 설치 상태 초기화 (디버그용)
|
|
243
|
-
[MenuItem("BACKND/Database/Reset Install State")]
|
|
244
|
-
private static void ResetInstallState()
|
|
245
|
-
{
|
|
246
|
-
EditorPrefs.DeleteKey(InstalledPrefsKey);
|
|
247
|
-
EditorPrefs.DeleteKey(SkippedPrefsKey);
|
|
248
|
-
Debug.Log("[BACKND Database] 설치 상태가 초기화되었습니다.");
|
|
249
|
-
}
|
|
250
200
|
}
|
|
251
201
|
}
|
package/README.md.meta
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.backnd.database",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"displayName": "BACKND Database",
|
|
5
5
|
"description": "BACKND Database is a Unity SDK for seamless integration with BACKND cloud database services.\n\nEasily manage and synchronize game data such as player profiles, game states, and leaderboards across multiple platforms.\nIdeal for Unity developers looking to implement robust database solutions without complex backend setups.",
|
|
6
6
|
"unity": "2021.3",
|