병합 오류 수정 및 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> /// </summary>
public LocalizedString GetLocalizedString(string key) public LocalizedString GetLocalizedString(string key)
{ {
if (string.IsNullOrWhiteSpace(key)) return null;
if (!_isInitialized) if (!_isInitialized)
{ {
Debug.LogWarning("[LocalizationManager] 호출 전에 초기화되지 않았습니다."); Debug.LogWarning("[LocalizationManager] 호출 전에 초기화되지 않았습니다.");

View File

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

View File

@ -37,5 +37,10 @@ public virtual bool OnInteracted(IInteractor interactor, ScriptableObject payloa
{ {
return true; 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; if (iCookware == null) return false;
var interactableCookwareType = iCookware.CookwareType; 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; return false;
} }