Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

com.backnd.database

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.backnd.database - npm Package Compare versions

Comparing version
0.0.10
to
0.0.11
+45
Internal/NullableHelper.cs
using System;
using UnityEngine.Scripting;
namespace BACKND.Database.Internal
{
[Preserve]
public static class NullableHelper
{
// DateTime
[Preserve]
public static DateTime? CreateNullableDateTime(DateTime value) => value;
// Int32
[Preserve]
public static int? CreateNullableInt32(int value) => value;
// Int64
[Preserve]
public static long? CreateNullableInt64(long value) => value;
// Boolean
[Preserve]
public static bool? CreateNullableBoolean(bool value) => value;
// Single (float)
[Preserve]
public static float? CreateNullableSingle(float value) => value;
// Double
[Preserve]
public static double? CreateNullableDouble(double value) => value;
// UInt32
[Preserve]
public static uint? CreateNullableUInt32(uint value) => value;
// UInt64
[Preserve]
public static ulong? CreateNullableUInt64(ulong value) => value;
// Guid
[Preserve]
public static Guid? CreateNullableGuid(Guid value) => value;
}
}

Sorry, the diff of this file is not supported yet

<?xml version="1.0" encoding="utf-8"?>
<linker>
<assembly fullname="BACKND.Database" preserve="all">
<type fullname="BACKND.Database.Internal.NullableHelper" preserve="all"/>
</assembly>
</linker>

Sorry, the diff of this file is not supported yet

+16
-33
using UnityEngine;
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEditor.Build;
using System.IO;

@@ -26,6 +26,4 @@

// 이미 설치 완료된 경우
if (IsAlreadyInstalled(targetPath))
{
// 파일은 있지만 심볼이 없는 경우 심볼만 추가
EnsureScriptingDefineSymbol();

@@ -35,3 +33,2 @@ return;

// 패키지 경로에서 소스 폴더 찾기
string sourcePath = FindSourcePath();

@@ -41,7 +38,6 @@

{
Debug.LogWarning("[BACKND Database] TheBackend~ 폴더를 찾을 수 없습니다.");
Debug.LogWarning("[BACKND Database] Could not find TheBackend~ folder.");
return;
}
// 자동 설치
InstallAssets(sourcePath, targetPath);

@@ -91,8 +87,5 @@ }

{
// 1. PackageInfo API를 사용하여 패키지 경로 찾기 (npm 패키지로 설치된 경우)
// Unity 공식 권장 방식: PackageInfo.FindForPackageName() + resolvedPath
var packageInfo = UnityEditor.PackageManager.PackageInfo.FindForPackageName(PackageName);
if (packageInfo != null)
{
// resolvedPath = 실제 디스크 경로 (예: Library/PackageCache/com.backnd.database@0.0.1)
string packageSourcePath = Path.Combine(packageInfo.resolvedPath, SourceFolderName);

@@ -105,3 +98,2 @@ if (Directory.Exists(packageSourcePath))

// 2. Assets 폴더에서 찾기 (개발 중인 경우)
string assetsSourcePath = Path.Combine("Assets", "BACKND", "Database", SourceFolderName);

@@ -120,5 +112,4 @@ if (Directory.Exists(assetsSourcePath))

{
EditorUtility.DisplayProgressBar("BACKND Database", "플러그인 설치 중...", 0f);
EditorUtility.DisplayProgressBar("BACKND Database", "Installing plugins...", 0f);
// 대상 폴더 생성
if (!Directory.Exists(targetPath))

@@ -129,10 +120,8 @@ {

// 재귀적으로 복사
CopyDirectory(sourcePath, targetPath);
EditorUtility.DisplayProgressBar("BACKND Database", "에셋 데이터베이스 갱신 중...", 0.9f);
EditorUtility.DisplayProgressBar("BACKND Database", "Refreshing asset database...", 0.9f);
AssetDatabase.Refresh();
// 스크립팅 심볼 추가 (BACKND.Database 어셈블리 컴파일 활성화)
AddScriptingDefineSymbol();

@@ -142,3 +131,3 @@

Debug.Log($"[BACKND Database] 플러그인이 설치되었습니다: {targetPath}");
Debug.Log($"[BACKND Database] Plugin installed successfully: {targetPath}");
}

@@ -148,8 +137,8 @@ catch (System.Exception e)

EditorUtility.ClearProgressBar();
Debug.LogError($"[BACKND Database] 플러그인 설치 실패: {e.Message}");
Debug.LogError($"[BACKND Database] Plugin installation failed: {e.Message}");
EditorUtility.DisplayDialog(
"BACKND Database",
$"플러그인 설치 중 오류가 발생했습니다.\n\n{e.Message}",
"확인"
$"An error occurred during plugin installation.\n\n{e.Message}",
"OK"
);

@@ -176,3 +165,3 @@ }

PlayerSettings.SetScriptingDefineSymbols(buildTarget, defines);
Debug.Log($"[BACKND Database] 스크립팅 심볼 추가됨: {DefineSymbol}");
Debug.Log($"[BACKND Database] Scripting define symbol added: {DefineSymbol}");
}

@@ -185,6 +174,4 @@ }

// 하위 폴더 복사
foreach (var subDir in dir.GetDirectories())
{
// 숨김 폴더 제외
if (subDir.Name.StartsWith("."))

@@ -198,6 +185,4 @@ continue;

// 파일 복사
foreach (var file in dir.GetFiles())
{
// 숨김 파일 및 .meta 파일 제외
if (file.Name.StartsWith(".") || file.Extension == ".meta")

@@ -208,3 +193,2 @@ continue;

// 이미 존재하는 파일은 덮어쓰지 않음
if (!File.Exists(targetFile))

@@ -217,3 +201,2 @@ {

// 메뉴에서 수동 설치
[MenuItem("The Backend/Database/Install Plugins")]

@@ -228,5 +211,5 @@ private static void ManualInstall()

"BACKND Database",
"TheBackend~ 폴더를 찾을 수 없습니다.\n\n" +
"패키지가 올바르게 설치되었는지 확인해주세요.",
"확인"
"Could not find TheBackend~ folder.\n\n" +
"Please verify that the package is properly installed.",
"OK"
);

@@ -242,6 +225,6 @@ return;

"BACKND Database",
$"Assets/{TargetFolderName} 폴더가 이미 존재합니다.\n\n" +
"새로운 파일만 추가됩니다. (기존 파일 유지)",
"계속",
"취소"
$"Assets/{TargetFolderName} folder already exists.\n\n" +
"Only new files will be added. (Existing files will be preserved)",
"Continue",
"Cancel"
);

@@ -248,0 +231,0 @@

{
"name": "com.backnd.database",
"version": "0.0.10",
"version": "0.0.11",
"displayName": "BACKND Database",

@@ -16,3 +16,3 @@ "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.",

"com.unity.nuget.newtonsoft-json": "3.2.2",
"com.backnd.tools": "0.0.4"
"com.backnd.tools": "0.0.5"
},

@@ -19,0 +19,0 @@ "category": "SDK",