Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created June 16, 2016 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/82ce24cd8319eaf59eb9149cde1c12b5 to your computer and use it in GitHub Desktop.
Save tsubaki/82ce24cd8319eaf59eb9149cde1c12b5 to your computer and use it in GitHub Desktop.
Variantのテキスト更新
using UnityEngine;
[CreateAssetMenu()]
public class Data : ScriptableObject
{
[SerializeField]
string message;
public string Message { get { return message; } }
}
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class LocalizeText : MonoBehaviour {
public Data data;
void OnEnable()
{
GetComponent<Text>().text = data.Message;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment