UnityEditor.TrueTypeFontImporter.IsFormatSupported C# (CSharp) Method

IsFormatSupported() private method

private IsFormatSupported ( ) : bool
return bool
        internal extern bool IsFormatSupported();
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

示例#1
0
 public override void OnInspectorGUI()
 {
     if (!this.m_FormatSupported.HasValue)
     {
         this.m_FormatSupported = true;
         foreach (UnityEngine.Object obj2 in base.targets)
         {
             TrueTypeFontImporter importer = obj2 as TrueTypeFontImporter;
             if ((importer == null) || !importer.IsFormatSupported())
             {
                 this.m_FormatSupported = false;
             }
         }
     }
     if (this.m_FormatSupported == false)
     {
         this.ShowFormatUnsupportedGUI();
     }
     else
     {
         EditorGUILayout.PropertyField(this.m_FontSize, new GUILayoutOption[0]);
         if (this.m_FontSize.intValue < 1)
         {
             this.m_FontSize.intValue = 1;
         }
         if (this.m_FontSize.intValue > 500)
         {
             this.m_FontSize.intValue = 500;
         }
         EditorGUILayout.IntPopup(this.m_FontRenderingMode, kRenderingModeStrings, kRenderingModeValues, new GUIContent("Rendering Mode"), new GUILayoutOption[0]);
         EditorGUILayout.IntPopup(this.m_TextureCase, kCharacterStrings, kCharacterValues, new GUIContent("Character"), new GUILayoutOption[0]);
         EditorGUILayout.IntPopup(this.m_AscentCalculationMode, kAscentCalculationModeStrings, kAscentCalculationModeValues, new GUIContent("Ascent Calculation Mode"), new GUILayoutOption[0]);
         if (!this.m_TextureCase.hasMultipleDifferentValues)
         {
             if (this.m_TextureCase.intValue != -2)
             {
                 if (this.m_TextureCase.intValue == 3)
                 {
                     EditorGUI.BeginChangeCheck();
                     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                     EditorGUILayout.PrefixLabel("Custom Chars");
                     EditorGUI.showMixedValue = this.m_CustomCharacters.hasMultipleDifferentValues;
                     GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.MinHeight(32f) };
                     string            source  = EditorGUILayout.TextArea(this.m_CustomCharacters.stringValue, GUI.skin.textArea, options);
                     EditorGUI.showMixedValue = false;
                     GUILayout.EndHorizontal();
                     if (EditorGUI.EndChangeCheck())
                     {
                         if (< > f__am$cache0 == null)
                         {
All Usage Examples Of UnityEditor.TrueTypeFontImporter::IsFormatSupported