void ReleaseTexture() { if (!string.IsNullOrEmpty(m_TextureName)) { ReferencedTextureManager.ReleaseTexture(m_TextureName); } }
void UpdateTexture() { target.material.SetTexture("_MainTex", null); target.material.SetTexture("_MaskTex", null); target.mainTexture = null; if (!string.IsNullOrEmpty(m_TextureName)) { ReferencedTextureManager.GetTexture2DAsync(m_TextureName, SetTextureAction, gameObject); } }
void UpdateTexture() { if (string.IsNullOrEmpty(m_TextureName)) { target.mainTexture = null; if (!string.IsNullOrEmpty(m_LastTextureName)) { ReferencedTextureManager.ReleaseTexture(m_LastTextureName); } m_LastTextureName = m_TextureName; } if (!string.IsNullOrEmpty(m_TextureName) && !m_TextureName.Equals(m_LastTextureName)) { if (!string.IsNullOrEmpty(m_LastTextureName)) { ReferencedTextureManager.ReleaseTexture(m_LastTextureName); } ReferencedTextureManager.GetTexture2DAsync(m_TextureName, SetTextureAction, gameObject); m_LastTextureName = m_TextureName; } }