private void LoadSpriteAsset(SpriteAsset spriteAsset) { //Debug.Log("**** Loading SpriteAsset *****"); if (spriteAsset != null) { } else { // Load Default SpriteAsset TMP_Settings settings = Resources.Load("TMP_Settings") as TMP_Settings; if (settings.spriteAsset != null) { spriteAsset = settings.spriteAsset; } else { spriteAsset = Resources.Load("Sprites/Default Sprite Atlas") as SpriteAsset; } } m_spriteAsset = spriteAsset; m_inlineGraphic.texture = m_spriteAsset.spriteSheet; if (m_TextMeshPro != null) { m_TextMeshPro.hasChanged = true; } if (m_TextMeshProUI != null) { m_TextMeshProUI.hasChanged = true; } }
private void LoadSpriteAsset(SpriteAsset spriteAsset) { if (spriteAsset == null) { // Load Default SpriteAsset TMP_Settings settings = Resources.Load("TMP Settings") as TMP_Settings; if (settings != null && settings.spriteAsset != null) { spriteAsset = settings.spriteAsset; } else { spriteAsset = Resources.Load("Sprite Assets/Default Sprite Asset") as SpriteAsset; } } m_spriteAsset = spriteAsset; m_inlineGraphic.texture = m_spriteAsset.spriteSheet; if (m_TextMeshPro != null) { m_TextMeshPro.havePropertiesChanged = true; } if (m_TextMeshProUI != null) { m_TextMeshProUI.havePropertiesChanged = true; } }
private void LoadSpriteAsset(SpriteAsset spriteAsset) { if (spriteAsset == null) { // Load Default SpriteAsset TMP_Settings settings = Resources.Load("TMP Settings") as TMP_Settings; if (settings != null && settings.spriteAsset != null) { spriteAsset = settings.spriteAsset; } else { spriteAsset = Resources.Load("Sprite Assets/Default Sprite Asset") as SpriteAsset; } // Kyle: we don't have a default, added this to remove console NRE spam if (spriteAsset == null) { return; } } m_spriteAsset = spriteAsset; m_inlineGraphic.texture = m_spriteAsset.spriteSheet; if (m_TextMeshPro != null) { m_TextMeshPro.havePropertiesChanged = true; } if (m_TextMeshProUI != null) { m_TextMeshProUI.havePropertiesChanged = true; } }
private void LoadSpriteAsset(SpriteAsset spriteAsset) { if (!(spriteAsset != null)) { spriteAsset = (Resources.Load("Sprites/Default Sprite Atlas") as SpriteAsset); } this.m_spriteAsset = spriteAsset; this.m_inlineGraphic.texture = this.m_spriteAsset.spriteSheet; if (this.m_TextMeshPro != null) { this.m_TextMeshPro.hasChanged = true; } if (this.m_TextMeshProUI != null) { this.m_TextMeshProUI.hasChanged = true; } }
private void LoadSpriteAsset(SpriteAsset spriteAsset) { if (spriteAsset == null) { TMP_Settings tMP_Settings = Resources.Load("TMP Settings") as TMP_Settings; spriteAsset = ((!(tMP_Settings != null) || !(tMP_Settings.spriteAsset != null)) ? (Resources.Load("Sprite Assets/Default Sprite Asset") as SpriteAsset) : tMP_Settings.spriteAsset); } m_spriteAsset = spriteAsset; m_inlineGraphic.texture = m_spriteAsset.spriteSheet; if (m_TextMeshPro != null) { m_TextMeshPro.havePropertiesChanged = true; } if (m_TextMeshProUI != null) { m_TextMeshProUI.havePropertiesChanged = true; } }
private void LoadSpriteAsset(SpriteAsset spriteAsset) { //Debug.Log("**** Loading SpriteAsset *****"); if (spriteAsset != null) { } else { // Load Default SpriteAsset spriteAsset = Resources.Load("Sprites/Default Sprite Atlas") as SpriteAsset; } m_spriteAsset = spriteAsset; m_inlineGraphic.texture = m_spriteAsset.spriteSheet; if (m_TextMeshPro != null) m_TextMeshPro.hasChanged = true; if (m_TextMeshProUI != null) m_TextMeshProUI.hasChanged = true; }
private void LoadSpriteAsset(SpriteAsset spriteAsset) { if (spriteAsset == null) { // Load Default SpriteAsset TMP_Settings settings = Resources.Load("TMP Settings") as TMP_Settings; if (settings != null && settings.spriteAsset != null) spriteAsset = settings.spriteAsset; else spriteAsset = Resources.Load("Sprite Assets/Default Sprite Asset") as SpriteAsset; } m_spriteAsset = spriteAsset; m_inlineGraphic.texture = m_spriteAsset.spriteSheet; if (m_TextMeshPro != null) m_TextMeshPro.havePropertiesChanged = true; if (m_TextMeshProUI != null) m_TextMeshProUI.havePropertiesChanged = true; }