Skip to content

Instantly share code, notes, and snippets.

@xrdnk
Created November 25, 2021 12:58
Show Gist options
  • Save xrdnk/aeda96219b21ec27b53d90992c6c79a8 to your computer and use it in GitHub Desktop.
Save xrdnk/aeda96219b21ec27b53d90992c6c79a8 to your computer and use it in GitHub Desktop.
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace Deniverse.UnityLocalizationSample.Presentation.UIView
{
public sealed class LocalizationUIView : MonoBehaviour
{
[SerializeField] Image _image_Flag;
[SerializeField] TextMeshProUGUI _text_HelloWorld;
/// <summary>
/// 国旗イメージの設定
/// </summary>
/// <param name="sprite"></param>
public void SetFlagImage(Sprite sprite) => _image_Flag.sprite = sprite;
/// <summary>
/// テキストの設定
/// </summary>
/// <param name="text"></param>
public void SetTextMessage(string text) => _text_HelloWorld.text = text;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment