Skip to content

Instantly share code, notes, and snippets.

@insthync
Last active April 20, 2018 01:02
Show Gist options
  • Save insthync/cd3bfe415e2e54c2b53d486ef6c16765 to your computer and use it in GitHub Desktop.
Save insthync/cd3bfe415e2e54c2b53d486ef6c16765 to your computer and use it in GitHub Desktop.
[Turnbase RPG] Avoid empty errror message key
public void OnGameServiceError(string error, UnityAction errorAction)
{
Debug.LogError("OnGameServiceError: " + error);
var errorText = string.IsNullOrEmpty(error) || !LanguageManager.Texts.ContainsKey(error) ? "" : LanguageManager.Texts[error];
messageDialogData.Enqueue(new UIMessageDialog.Data(LanguageManager.Texts[GameText.TITLE_ERROR_DIALOG], errorText, errorAction));
ShowError();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment