public void OnTextNameChange(string oldName, string newName) { var inGameText = InGameText.GetInstance(); if (inGameText) { var textData = inGameText.GetTextData(newName); if (textData != null) { id = textData.id; EditorUtility.SetDirty(this.gameObject); } } }
public void OnIdChange(int oldId, int newId) { var inGameText = InGameText.GetInstance(); if (inGameText) { var textData = inGameText.GetTextData(newId); if (textData != null) { textName = textData.name; EditorUtility.SetDirty(this.gameObject); } } }
public DropdownList <string> GetTextName() { var result = new DropdownList <string>(); var inGameText = InGameText.GetInstance(); if (inGameText) { var textList = inGameText.GetTextList(); foreach (var text in textList.texts) { result.Add(text.name, text.name); } } else { LogHelper.LogWarning("Missing In Game Text instance for Text Localization"); } return(result); }
public void LoadText() { LogHelper.Log("Loading new Text for " + this); this.text.text = InGameText.GetInstance().GetTextData(id).content; EditorUtility.SetDirty(this.gameObject); }