병합 오류 수정 및 GetLocalizedString null 처리

This commit is contained in:
NTG 2025-08-28 20:19:37 +09:00
parent c85504e8f8
commit 6037cd4d63
4 changed files with 14 additions and 6 deletions

View File

@ -70,6 +70,8 @@ public void PostInit()
/// </summary>
public LocalizedString GetLocalizedString(string key)
{
if (string.IsNullOrWhiteSpace(key)) return null;
if (!_isInitialized)
{
Debug.LogWarning("[LocalizationManager] 호출 전에 초기화되지 않았습니다.");

View File

@ -47,13 +47,14 @@ public void HandleEvent(HideInteractionUiEvent evt)
private void ShowInteractionUiEvent(ShowInteractionUiEvent evt)
{
_previousLocalizedString = LocalizationManager.Instance.GetLocalizedString(evt.TextKey);
_textLabel.color = evt.CanInteract ? _canInteractTextColor : _cannotInteractTextColor;
if (_textLabelLocalizeStringEvent.StringReference != _previousLocalizedString)
var currentLocalizedString = LocalizationManager.Instance.GetLocalizedString(evt.TextKey);
if (currentLocalizedString != _previousLocalizedString)
{
_textLabelLocalizeStringEvent.StringReference = _previousLocalizedString;
_textLabelLocalizeStringEvent.StringReference = currentLocalizedString;
_previousLocalizedString = LocalizationManager.Instance.GetLocalizedString(evt.TextKey);
}
_textLabel.color = evt.CanInteract ? _canInteractTextColor : _cannotInteractTextColor;
_filledImage.fillAmount = evt.HoldProgress;
if (_panel.activeInHierarchy == false)

View File

@ -37,5 +37,10 @@ public virtual bool OnInteracted(IInteractor interactor, ScriptableObject payloa
{
return true;
}
public string GetCurrentSubsystemTypeName()
{
return _cookType.ToString();
}
}
}

View File

@ -24,7 +24,7 @@ public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInter
if (iCookware == null) return false;
var interactableCookwareType = iCookware.CookwareType;
if (DataManager.Instance.GetDataSo<CookwareDataSo>().TryGetValueByCookwareType(interactableCookwareType, out var cookwareData) == false)
if (DataManager.Instance.GetDataAsset<CookwareDataAsset>().TryGetValueByCookwareType(interactableCookwareType, out var cookwareData) == false)
{
return false;
}