Created
June 16, 2016 15:46
-
-
Save tsubaki/82ce24cd8319eaf59eb9149cde1c12b5 to your computer and use it in GitHub Desktop.
Variantのテキスト更新
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[CreateAssetMenu()] | |
public class Data : ScriptableObject | |
{ | |
[SerializeField] | |
string message; | |
public string Message { get { return message; } } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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