LookupFallbackFontReferences() private method

private LookupFallbackFontReferences ( string _names ) : UnityEngine.Font[]
_names string
return UnityEngine.Font[]
        private void SetFontNames(string fontNames)
        {
            string[] array;
            if (!this.m_GotFontNamesFromImporter)
            {
                array = new string[0];
            }
            else
            {
                array = fontNames.Split(new char[]
                {
                    ','
                });
                for (int i = 0; i < array.Length; i++)
                {
                    array[i] = array[i].Trim();
                }
            }
            this.m_FontNamesArraySize.intValue = array.Length;
            SerializedProperty serializedProperty = this.m_FontNamesArraySize.Copy();

            for (int j = 0; j < array.Length; j++)
            {
                serializedProperty.Next(false);
                serializedProperty.stringValue = array[j];
            }
            TrueTypeFontImporter trueTypeFontImporter = (TrueTypeFontImporter)base.target;

            this.m_FallbackFontReferences = trueTypeFontImporter.LookupFallbackFontReferences(array);
        }
示例#2
0
        private void SetFontNames(string fontNames)
        {
            string[] array;
            if (fontNames == this.m_DefaultFontNamesString)
            {
                array = new string[0];
            }
            else
            {
                array = fontNames.Split(new char[]
                {
                    ','
                });
                for (int i = 0; i < array.Length; i++)
                {
                    array[i] = array[i].Trim();
                }
            }
            this.m_FontNamesArraySize.intValue = array.Length;
            SerializedProperty serializedProperty = this.m_FontNamesArraySize.Copy();

            for (int j = 0; j < array.Length; j++)
            {
                serializedProperty.Next(false);
                serializedProperty.stringValue = array[j];
            }
            TrueTypeFontImporter trueTypeFontImporter = this.target as TrueTypeFontImporter;

            Font[] array2 = trueTypeFontImporter.LookupFallbackFontReferences(array);
            this.m_FallbackFontReferencesArraySize.intValue = array2.Length;
            SerializedProperty serializedProperty2 = this.m_FallbackFontReferencesArraySize.Copy();

            for (int k = 0; k < array2.Length; k++)
            {
                serializedProperty2.Next(false);
                serializedProperty2.objectReferenceValue = array2[k];
            }
        }