static MaterialUIIconHelper() { if (m_Font == null) { m_Font = VectorImageManager.GetIconFont(VectorImageManager.materialUIIconsFontName); } if (m_IconSet == null) { m_IconSet = VectorImageManager.GetIconSet(VectorImageManager.materialUIIconsFontName); } }
private void UpdateFontPackInfo() { string name = m_VectorImageDatas[0].font.name; m_VectorImageSet = VectorImageManager.GetIconSet(name); m_IconFont = VectorImageManager.GetIconFont(name); m_GuiStyle = new GUIStyle { font = m_IconFont }; m_GuiStyle.normal.textColor = Color.white; UpdateGlyphList(); // Assign the very first icon of the imageSet if the glyph is null Glyph glyph = m_VectorImageSet.iconGlyphList.Where(x => x.name.Equals(m_VectorImageDatas[0].glyph.name) && x.unicode.Equals(m_VectorImageDatas[0].glyph.unicode.Replace("\\u", ""))).FirstOrDefault(); if (glyph == null) { SetGlyph(0); } }