public void SetText(string textName, string text) { TextDictionaryItem item; if (!m_textDictionary.TryGetValue(textName, out item)) { m_textDictionary[textName] = new TextDictionaryItem(text); } else { if (item.renderer != null) { item.renderer.SetText(text); } item.text = text; } }
public void SetTextRenderer(string fullPath, string textName, string text, TextRenderer textRenderer) { bool setText = false; string fullName = fullPath + "." + textName; TextDictionaryItem item; if (m_textDictionary.TryGetValue(fullName, out item)) { item.renderer = textRenderer; if (!String.IsNullOrEmpty(item.text)) { textRenderer.SetText(item.text); setText = true; } } else { m_textDictionary[fullName] = new TextDictionaryItem(text, textRenderer); } if (m_textDictionary.TryGetValue(textName, out item)) { item.renderer = textRenderer; if (!setText && !String.IsNullOrEmpty(item.text)) { textRenderer.SetText(item.text); setText = true; } } else { m_textDictionary[textName] = new TextDictionaryItem(text, textRenderer); } if (!setText) { textRenderer.SetText(text); } }
public void SetTextRenderer(string fullPath, string textName, string text, TextRenderer textRenderer) { bool setText = false; string fullName = fullPath + "." + textName; TextDictionaryItem item; if (m_textDictionary.TryGetValue(fullName, out item)) { item.renderer = textRenderer; if (!String.IsNullOrEmpty(item.text)) { textRenderer.SetText(item.text); setText = true; } } else { m_textDictionary[fullName] = new TextDictionaryItem(text, textRenderer); } if (m_textDictionary.TryGetValue(textName, out item)) { item.renderer = textRenderer; if (!setText && !String.IsNullOrEmpty(item.text)) { textRenderer.SetText(item.text); setText = true; } } else { m_textDictionary[textName] = new TextDictionaryItem(text, textRenderer); } if (!setText) textRenderer.SetText(text); }
public void SetText(string textName, string text) { TextDictionaryItem item; if (!m_textDictionary.TryGetValue(textName, out item)) { m_textDictionary[textName] = new TextDictionaryItem(text); } else { if (item.renderer != null) item.renderer.SetText(text); item.text = text; } }