- Home /
Question by
Gasimo · Oct 14, 2018 at 07:24 PM ·
uistringscriptableobjectlocalization
Specify from inspector which scriptable field to use
Hello Everyone! I have a small Scriptable object with a bunch of Strings stored inside. Then I have a Text Component, where I want to assign one of the strings, which I would specify from inspector without writing scripts for each text.
[CreateAssetMenu(menuName = "SCP/Localization/UI")]
public class LanguagePack_UI : ScriptableObject {
public string Register_Success = "Congratulations!";
public string Register_SuccessInfo = "You have been successfully registered to SCP: Foundation Services. All materials are confidential, and must NOT be shared. Sharing this information will result in your immediate Termination.";
public string UI_Next = "Next";
public string UI_Continue = "Continue";
public string UI_Skip = "Skip";
//THE LIST GOES ON AND ON...
}
So I want to choose which string to read from using the Unity Editor (Inspector) window. Thanks in Advance!
Comment