/// <summary> /// ScenarioManagerのRequestNextLineよりBroadcastMessage経由で呼ばれるコールバック。 /// 新しいテキストを呼ぶ直前に呼ばれる /// </summary> public void OnRequestNextLine() { if (m_rawImage.texture != null) { TextureresourceManager.Mark(m_rawImage.texture.name); } }
public void Command(Dictionary <string, string> command) { var fileName = command["image"]; var objectName = command["name"]; var obj = Array.Find <GameObject>(GameObject.FindGameObjectsWithTag("Layer"), item => item.name == objectName); obj.GetComponent <Layer>().UpdateTexture(TextureresourceManager.Load(fileName)); }
/// <summary> /// テキストコマンド実行時に呼ばれるコールバック /// UITextManagerより呼ばれる /// </summary> public void UpdateTexture(Texture texture) { if (texture == null) { m_rawImage.enabled = false; m_rawImage.texture = null; } else { m_rawImage.texture = texture; m_rawImage.enabled = true; m_rawImage.SetNativeSize(); TextureresourceManager.Mark(texture.name); } }
public void PreCommand(Dictionary <string, string> command) { var fileName = command["image"]; TextureresourceManager.Load(fileName); }