Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
김산 2025-09-01 18:21:51 +09:00
commit 6dff1507a1
37 changed files with 62 additions and 135 deletions

View File

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

View File

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

View File

@ -21,7 +21,7 @@ TextureImporter:
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
@ -46,7 +46,7 @@ TextureImporter:
spriteMode: 2
spriteExtrude: 2
spriteMeshType: 0
alignment: 9
alignment: 0
spritePivot: {x: 0.5, y: 0.45117188}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}

View File

@ -21,7 +21,7 @@ TextureImporter:
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
@ -46,7 +46,7 @@ TextureImporter:
spriteMode: 2
spriteExtrude: 2
spriteMeshType: 0
alignment: 9
alignment: 0
spritePivot: {x: 0.5, y: 0.22851562}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}

View File

@ -21,7 +21,7 @@ TextureImporter:
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
@ -46,7 +46,7 @@ TextureImporter:
spriteMode: 2
spriteExtrude: 2
spriteMeshType: 0
alignment: 9
alignment: 0
spritePivot: {x: 0.5, y: 0.22851562}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}

View File

@ -21,7 +21,7 @@ TextureImporter:
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
@ -46,7 +46,7 @@ TextureImporter:
spriteMode: 2
spriteExtrude: 2
spriteMeshType: 0
alignment: 9
alignment: 0
spritePivot: {x: 0.5, y: 0.22851562}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -9,16 +9,13 @@ public class AssetPostProcessors : AssetPostprocessor
private void OnPreprocessTexture()
{
var importer = assetImporter as TextureImporter;
if (!importer) return;
var upperPath = importer.assetPath.ToUpper();
if (upperPath.Contains(PathConstants.RawSpritesPathUpper))
{
if (upperPath.Contains(PathConstants.RawOnlyAtlasPathUpper))
{
AssetPostprocessorSprite.OnPreprocessTextureOnlyAtlas(importer);
}
else if (upperPath.Contains(PathConstants.RawUiPathUpper))
if (upperPath.Contains(PathConstants.RawUiPathUpper))
{
AssetPostprocessorSprite.OnPreprocessTextureForUi(importer);
}

View File

@ -16,7 +16,6 @@ public static class AssetPostprocessorSprite
public static void OnPreprocessTexture(TextureImporter importer)
{
importer.textureType = TextureImporterType.Sprite;
importer.spriteImportMode = SpriteImportMode.Single;
importer.GetSourceTextureWidthAndHeight(out var width, out var height);
importer.spritePixelsPerUnit = width <= height ? width : height;
@ -25,7 +24,6 @@ public static void OnPreprocessTexture(TextureImporter importer)
importer.isReadable = true;
importer.mipmapEnabled = false;
importer.streamingMipmaps = false;
importer.wrapMode = TextureWrapMode.Clamp;
importer.filterMode = FilterMode.Bilinear;
importer.textureCompression = TextureImporterCompression.Uncompressed;
@ -44,16 +42,11 @@ public static void OnPreprocessTexture(TextureImporter importer)
public static void OnPreprocessTextureForUi(TextureImporter importer)
{
importer.textureType = TextureImporterType.Sprite;
importer.spriteImportMode = SpriteImportMode.Single;
// 기본 PPU (UI는 100 또는 1 고정 추천)
// importer.spritePixelsPerUnit = 100f;
importer.sRGBTexture = true;
importer.isReadable = false;
importer.mipmapEnabled = false;
importer.streamingMipmaps = false;
importer.wrapMode = TextureWrapMode.Clamp;
importer.filterMode = FilterMode.Bilinear;
importer.textureCompression = TextureImporterCompression.Uncompressed;
@ -68,17 +61,6 @@ public static void OnPreprocessTextureForUi(TextureImporter importer)
importer.SetTextureSettings(textureSettings);
}
public static void OnPreprocessTextureOnlyAtlas(TextureImporter importer)
{
if (importer.textureType == TextureImporterType.Sprite)
{
return;
}
importer.textureType = TextureImporterType.Sprite;
importer.spriteImportMode = SpriteImportMode.Single;
}
private static void TryApplyPivotAfterImport(string path)
{

View File

@ -13,6 +13,7 @@ public class DataManager : Singleton<DataManager>, IManager
private const string AssetLabel = "GoogleSheetSo";
private const string Icon = "_icon";
private const string AtlasLabel = "Atlas";
public void PreInit()
{
@ -21,7 +22,7 @@ public void PreInit()
public async Task Init()
{
await LoadAllGameDataSo();
await LoadAllGameDataAssets();
await LoadSpriteAtlas();
}
@ -30,7 +31,7 @@ public void PostInit()
}
private async Task LoadAllGameDataSo()
private async Task LoadAllGameDataAssets()
{
var assets = await AssetManager.Instance.LoadAssetsByLabel<ScriptableObject>(AssetLabel);
_dataAssetTable = new Dictionary<Type, ScriptableObject>(assets.Count);
@ -45,7 +46,7 @@ private async Task LoadAllGameDataSo()
private async Task LoadSpriteAtlas()
{
List<SpriteAtlas> spriteAtlases = await AssetManager.Instance.LoadAssetsByLabel<SpriteAtlas>(DataConstants.AtlasLabel);
List<SpriteAtlas> spriteAtlases = await AssetManager.Instance.LoadAssetsByLabel<SpriteAtlas>(AtlasLabel);
_spriteAtlas = new Dictionary<string, Sprite>(spriteAtlases.Count);
foreach (var atlas in spriteAtlases)

View File

@ -269,6 +269,13 @@ public void OnSubmit(BaseEventData eventData)
public void SetInteractable(bool interactable)
{
_button.interactable = interactable;
if (interactable == false)
{
_isHighlighted = false;
_isPressed = false;
_isSelected = false;
_isToggled = false;
}
UpdateVisualState();
}

View File

@ -65,7 +65,6 @@ protected override void OnCreatedInitializePopup()
{
InitializeViews();
InitializeTabGroups();
SetupCategoryTabs();
SetupBindings();
}
@ -173,12 +172,6 @@ private void InitializeViews()
}
}
private void SetupCategoryTabs()
{
_menuCategoryTabs.UseDefaultAllowedValues();
_cookwareCategoryTabs.UseDefaultAllowedValues();
}
private void InitializeTabGroups()
{
_sectionTabs.Initialize(OnSectionTabSelected);
@ -189,7 +182,7 @@ private void InitializeTabGroups()
private void UpdateSectionTabs()
{
if (_viewModel == null) return;
_sectionTabs.SelectTab((int)_viewModel.CurrentSection);
_sectionTabs.TrySelectTab((int)_viewModel.CurrentSection);
}
private void UpdateCategoryTabs()
@ -199,10 +192,10 @@ private void UpdateCategoryTabs()
switch (_viewModel.CurrentSection)
{
case SectionButtonType.Menu:
_menuCategoryTabs.SelectTab((int)_viewModel.CurrentCategory);
_menuCategoryTabs.TrySelectTab((int)_viewModel.CurrentCategory);
break;
case SectionButtonType.Cookware:
_cookwareCategoryTabs.SelectTab((int)_viewModel.CurrentCategory);
_cookwareCategoryTabs.TrySelectTab((int)_viewModel.CurrentCategory);
break;
}
}
@ -264,7 +257,8 @@ private void HandleCloseRequested()
private void HandleMenuCategorySelected(InventoryCategoryType category)
{
_menuCategoryTabs.SelectTab((int)category);
if (_menuCategoryTabs.TrySelectTab((int)category)) return;
if (_cookwareCategoryTabs.TrySelectTab((int)category)) return;
}
private void OnSectionTabSelected(int sectionValue)

View File

@ -76,22 +76,6 @@ public void Initialize(Action<int> onTabSelected)
InitializeTabs();
}
/// <summary>
/// 기본 허용 값들을 사용하여 탭을 초기화합니다.
/// </summary>
public void UseDefaultAllowedValues()
{
if (TabButtonConfig.TryGetValue(_tabButtonType, out List<int> defaultValues))
{
// 기본값을 바로 사용하여 탭 초기화
InitializeTabsWithValues(defaultValues);
}
else
{
Debug.LogWarning($"TabButtonType {_tabButtonType}에 대한 설정이 정의되지 않았습니다.", this);
}
}
/// <summary>
/// 지정된 값들로 탭들을 초기화합니다.
/// </summary>
@ -144,24 +128,23 @@ private void InitializeTabs()
/// </summary>
private void HandleTabButtonClicked(int tabValue)
{
SelectTab(tabValue);
TrySelectTab(tabValue);
}
/// <summary>
/// 지정된 값을 가진 탭을 선택합니다.
/// </summary>
public void SelectTab(int tabValue)
public bool TrySelectTab(int tabValue)
{
if (_tabLookup == null || _tabLookup.Count == 0)
{
Debug.LogWarning("탭 룩업이 초기화되지 않았습니다.", this);
return;
return false;
}
if (!_tabLookup.ContainsKey(tabValue))
if (_tabLookup.ContainsKey(tabValue) == false)
{
Debug.LogWarning($"탭 값 {tabValue}에 해당하는 탭을 찾을 수 없습니다.", this);
return;
return false;
}
CurrentTabValue = tabValue;
@ -174,6 +157,7 @@ public void SelectTab(int tabValue)
// 이벤트 호출
OnTabSelected?.Invoke(tabValue);
return true;
}
/// <summary>
@ -185,7 +169,7 @@ public void SelectFirstTab()
if (_tabButtons[0] != null)
{
var firstTabValue = _tabButtons[0].TabValue;
SelectTab(firstTabValue);
TrySelectTab(firstTabValue);
}
}
@ -223,7 +207,7 @@ public void Move(int direction)
// 상호작용 가능한 탭을 찾았으면 이동
if (IsTabInteractable(tabValues[newIndex]))
{
SelectTab(tabValues[newIndex]);
TrySelectTab(tabValues[newIndex]);
}
}

View File

@ -10,28 +10,6 @@ public static class CommonConstants
public const string BlockImage = "BlockImage";
}
public static class DataConstants
{
public const string GameStateSo = "GameStateSo";
public const string InventoryTestDataSo = "InventoryTestDataSo";
public const string ItemDataSo = "ItemDataAsset";
public const string RecipeDataSo = "RecipeDataAsset";
public const string FoodDataSo = "FoodDataAsset";
public const string DrinkDataSo = "DrinkDataAsset";
public const string IngredientDataSo = "IngredientDataAsset";
public const string CookwareDataSo = "CookwareDataAsset";
public const string TasteDataSo = "TasteDataAsset";
public const string EnvironmentDataSo = "EnvironmentDataAsset";
public const string LevelDataSo = "LevelDataAsset";
public const string CustomerPoolDataSo = "CustomerPoolDataAsset";
public const string UiInputBindingSo = "UiInputBindingSo";
public const string RestaurantDataSo = "RestaurantDataSo";
public const string AtlasLabel = "Atlas";
public const string BasePropSpriteMaterial = "BasePropSpriteMaterial";
}
public static class RestaurantPlayerAnimationType
{
public const string Idle = "Idle";