Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
1b6483dd7c
81
.cursorrules
81
.cursorrules
@ -1,81 +0,0 @@
|
|||||||
@@ -0,0 +1,80 @@
|
|
||||||
# Unity 6000.1.0f1 + URP 프로젝트 규칙
|
|
||||||
|
|
||||||
## 기술 스택
|
|
||||||
- Unity 버전: 6000.1.0f1
|
|
||||||
- 렌더링 파이프라인: Universal Render Pipeline (URP)
|
|
||||||
|
|
||||||
## 코딩 원칙
|
|
||||||
### 1. 아키텍처 설계
|
|
||||||
- 모듈화된 컴포넌트 기반 아키텍처 적용
|
|
||||||
- MVVM 패턴 적극 활용
|
|
||||||
- GameState, GameEvent, GameFlow, GameFramework 구조 활용
|
|
||||||
- Restaurant 관련 시스템 모듈화 (RestaurantState, RestaurantEvent, RestaurantCharacter 등)
|
|
||||||
- 레이어 간 의존성 최소화
|
|
||||||
|
|
||||||
### 2. 종속성 관리
|
|
||||||
- 인터페이스 기반 설계 우선
|
|
||||||
- 구체 클래스보다 추상화 선호
|
|
||||||
- Dependency Injection 패턴 활용
|
|
||||||
- 강한 결합도 지양, 느슨한 결합도 지향
|
|
||||||
|
|
||||||
### 3. 유지보수성
|
|
||||||
- SOLID 원칙 준수
|
|
||||||
- 단일 책임 원칙 (SRP) 엄격 적용
|
|
||||||
- 개방-폐쇄 원칙 (OCP) 준수
|
|
||||||
- 코드 재사용성 극대화
|
|
||||||
|
|
||||||
### 4. 확장성
|
|
||||||
- 플러그인 아키텍처 패턴 적용
|
|
||||||
- 이벤트 기반 시스템 활용
|
|
||||||
- 모듈화된 컴포넌트 설계
|
|
||||||
- 새로운 기능 추가 시 기존 코드 수정 최소화
|
|
||||||
|
|
||||||
### 5. 명명 규칙 (Naming Conventions)
|
|
||||||
- **변수명**: 의미있는 단어 사용, 줄임말 지양
|
|
||||||
- ❌ `btn`, `txt`, `obj`, `go`, `ui`, `mg`, `ctrl`, 'kvp' (kvp같은 경우 key 또는 value가 무엇인지 알 수 있는 변수명 사용)
|
|
||||||
- ✅ `button`, `text`, `object`, `gameObject`, `userInterface`, `manager`, `controller`
|
|
||||||
- ✅ `keyValuePair`, `tabValueButton`, `enumValueTabButton` (구체적인 의미 표현)
|
|
||||||
- **함수명**: 동사로 시작하는 명확한 의미 표현
|
|
||||||
- ❌ `Init()`, `Setup()`, `Get()`, `Set()`
|
|
||||||
- ✅ `Initialize()`, `SetupComponents()`, `GetPlayerData()`, `SetPlayerHealth()`
|
|
||||||
|
|
||||||
### 6. 코드 스타일
|
|
||||||
- **논리 연산자**: `!` 키워드 대신 `== false` 사용
|
|
||||||
- ❌ `if (!isActive)`, `if (!hasComponent)`
|
|
||||||
- ✅ `if (isActive == false)`, `if (hasComponent == false)`
|
|
||||||
- **문자열**: 리터럴보다 상수 사용 권장
|
|
||||||
- **컬렉션 타입**: 성능상 우월한 경우가 아닌 이상 `List<>` 사용 권장
|
|
||||||
- ❌ `int[]`, `string[]`, `GameObject[]` (일반적인 경우)
|
|
||||||
- ✅ `List<int>`, `List<string>`, `List<GameObject>` (일반적인 경우)
|
|
||||||
- ⚠️ `int[]` (고정 크기, 성능이 중요한 경우만)
|
|
||||||
|
|
||||||
## Unity 특화 규칙
|
|
||||||
### URP 최적화
|
|
||||||
- URP 렌더링 파이프라인 최적화 우선
|
|
||||||
- Shader Graph 활용 권장
|
|
||||||
- Volume 시스템 적극 활용
|
|
||||||
- 렌더링 성능 모니터링
|
|
||||||
|
|
||||||
### 성능 고려사항
|
|
||||||
- Object Pooling 패턴 적용
|
|
||||||
- 메모리 할당 최소화
|
|
||||||
- 적절한 Update/LateUpdate 사용
|
|
||||||
- Addressables 시스템 활용
|
|
||||||
|
|
||||||
## 프로젝트 구조
|
|
||||||
- Assets/_DDD: 프로젝트 핵심 시스템 (프로젝트명)
|
|
||||||
- Assets/_ScriptAssets: 스크립트 에셋 및 ScriptableObject
|
|
||||||
- Assets/_Scripts: 모듈화된 스크립트 시스템들
|
|
||||||
- GameFramework: 게임 프레임워크 핵심
|
|
||||||
- GameState: 게임 상태 관리
|
|
||||||
- GameEvent: 게임 이벤트 시스템
|
|
||||||
- GameFlow: 게임 플로우 제어
|
|
||||||
- Restaurant*: 레스토랑 시뮬레이션 관련 시스템
|
|
||||||
- InputSystem: 입력 시스템
|
|
||||||
- Audio: 오디오 시스템
|
|
||||||
- 각 폴더별 명확한 책임 분리
|
|
||||||
|
|
||||||
## 프레임워크 활용
|
|
||||||
- 기존 프레임워크와의 통합 방법
|
|
||||||
- 커스텀 프레임워크 확장 방법
|
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -98,11 +98,7 @@ Packages/com.distantlands.cozy.core/Samples~/Legacy Integrations/*.unitypackage.
|
|||||||
Assets/_DDD/_Addressables/Sprites/*
|
Assets/_DDD/_Addressables/Sprites/*
|
||||||
.autosave/
|
.autosave/
|
||||||
|
|
||||||
*/Assets/AddressableAssetsData/AssetGroups/*.asset
|
*/Assets/AddressableAssetsData/*
|
||||||
*/Assets/AddressableAssetsData/Android*
|
|
||||||
*/Assets/AddressableAssetsData/iOS*
|
|
||||||
*/Assets/AddressableAssetsData/Windows*
|
|
||||||
*/Assets/AddressableAssetsData/*/*.bin*
|
|
||||||
|
|
||||||
ProjectSettings/Packages/com.unity.probuilder/Settings.json
|
ProjectSettings/Packages/com.unity.probuilder/Settings.json
|
||||||
*.DotSettings
|
*.DotSettings
|
||||||
|
0
Assets/External/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader
vendored
Executable file → Normal file
0
Assets/External/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader
vendored
Executable file → Normal file
0
Assets/External/HighlightPlus/Runtime/Resources/HighlightPlus/blueNoiseVL.png
vendored
Executable file → Normal file
0
Assets/External/HighlightPlus/Runtime/Resources/HighlightPlus/blueNoiseVL.png
vendored
Executable file → Normal file
@ -6,9 +6,7 @@ namespace DDD
|
|||||||
{
|
{
|
||||||
public static class ProjectSetupMenu
|
public static class ProjectSetupMenu
|
||||||
{
|
{
|
||||||
private const string MenuPath = "Tools/Project Setup";
|
[MenuItem("ProjectDDD/Project Setup", priority = 0)]
|
||||||
|
|
||||||
[MenuItem(MenuPath)]
|
|
||||||
public static void OpenSetupByType()
|
public static void OpenSetupByType()
|
||||||
{
|
{
|
||||||
var guids = AssetDatabase.FindAssets("t:" + nameof(ProjectDDD_Setup));
|
var guids = AssetDatabase.FindAssets("t:" + nameof(ProjectDDD_Setup));
|
||||||
|
BIN
Assets/_DDD/_ScriptAssets/Localization/Global_Message/Global_Message Shared Data.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Global_Message/Global_Message Shared Data.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Global_Message/Global_Message_en.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Global_Message/Global_Message_en.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Global_Message/Global_Message_ja.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Global_Message/Global_Message_ja.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Global_Message/Global_Message_ko.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Global_Message/Global_Message_ko.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Description/Item_Description Shared Data.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Description/Item_Description Shared Data.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Description/Item_Description_en.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Description/Item_Description_en.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Description/Item_Description_ja.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Description/Item_Description_ja.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Description/Item_Description_ko.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Description/Item_Description_ko.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Name/Item_Name Shared Data.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Name/Item_Name Shared Data.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Name/Item_Name_en.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Name/Item_Name_en.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Name/Item_Name_ja.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Name/Item_Name_ja.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Name/Item_Name_ko.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Name/Item_Name_ko.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Taste/Item_Taste Shared Data.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Taste/Item_Taste Shared Data.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Taste/Item_Taste_en.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Taste/Item_Taste_en.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Taste/Item_Taste_ja.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Taste/Item_Taste_ja.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Taste/Item_Taste_ko.asset
(Stored with Git LFS)
BIN
Assets/_DDD/_ScriptAssets/Localization/Item_Taste/Item_Taste_ko.asset
(Stored with Git LFS)
Binary file not shown.
@ -2,9 +2,11 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine.Localization.Tables;
|
using UnityEngine.Localization.Tables;
|
||||||
|
using UnityEngine.Localization.Metadata;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using UnityEditor.Localization;
|
using UnityEditor.Localization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace DDD
|
namespace DDD
|
||||||
{
|
{
|
||||||
@ -59,7 +61,16 @@ public static async void ImportAllFromSheet(string webAppUrl)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.AddEntry(sharedEntry.Id, row[localeCode]);
|
// Smart String 처리 정책
|
||||||
|
// 값에 SmartFormat 구문(중괄호)이 포함되어 있는 경우에만 Smart로 간주
|
||||||
|
string value = row[localeCode];
|
||||||
|
bool containsSmartSyntax = ContainsSmartFormatSyntax(value);
|
||||||
|
|
||||||
|
var entry = table.AddEntry(sharedEntry.Id, value);
|
||||||
|
if (entry != null)
|
||||||
|
{
|
||||||
|
entry.IsSmart = containsSmartSyntax;
|
||||||
|
}
|
||||||
EditorUtility.SetDirty(table);
|
EditorUtility.SetDirty(table);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -69,6 +80,19 @@ public static async void ImportAllFromSheet(string webAppUrl)
|
|||||||
|
|
||||||
Debug.Log("<color=green>[Localization Import]</color> 완료: Google Sheet → Unity");
|
Debug.Log("<color=green>[Localization Import]</color> 완료: Google Sheet → Unity");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SmartFormat 사용 여부를 간단히 추정합니다.
|
||||||
|
/// 대부분의 SmartFormat 구문은 중괄호를 포함하므로 값에 '{'와 '}'가 모두 존재하는 경우 Smart로 판단합니다.
|
||||||
|
/// </summary>
|
||||||
|
private static bool ContainsSmartFormatSyntax(string value)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(value)) return false;
|
||||||
|
int openIdx = value.IndexOf('{');
|
||||||
|
if (openIdx < 0) return false;
|
||||||
|
int closeIdx = value.IndexOf('}', openIdx + 1);
|
||||||
|
return closeIdx >= 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
@ -7,13 +7,13 @@ public static class LocalizationSyncTool
|
|||||||
{
|
{
|
||||||
public static readonly string WebAppUrl = "https://script.google.com/macros/s/AKfycbwVQ7_x0Didf_13h3qPB9lSMobBR9xr6nLffj_n8znNvfs-pdNylNA7nWzd2R-_IHGf/exec";
|
public static readonly string WebAppUrl = "https://script.google.com/macros/s/AKfycbwVQ7_x0Didf_13h3qPB9lSMobBR9xr6nLffj_n8znNvfs-pdNylNA7nWzd2R-_IHGf/exec";
|
||||||
|
|
||||||
[MenuItem("Tools/Localization/Google Sheet → Unity")]
|
[MenuItem("ProjectDDD/Localization/Google Sheet → Unity")]
|
||||||
public static void ImportAll()
|
public static void ImportAll()
|
||||||
{
|
{
|
||||||
LocalizationImporter.ImportAllFromSheet(WebAppUrl);
|
LocalizationImporter.ImportAllFromSheet(WebAppUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
[MenuItem("Tools/Localization/Unity → Google Sheet")]
|
[MenuItem("ProjectDDD/Localization/Unity → Google Sheet")]
|
||||||
public static void ExportAll()
|
public static void ExportAll()
|
||||||
{
|
{
|
||||||
LocalizationExporter.ExportAllToSheet(WebAppUrl);
|
LocalizationExporter.ExportAllToSheet(WebAppUrl);
|
||||||
|
Loading…
Reference in New Issue
Block a user