Exemple #1
0
        private List <QualitySettingsEditor.QualitySetting> GetQualitySettings()
        {
            List <QualitySettingsEditor.QualitySetting> list = new List <QualitySettingsEditor.QualitySetting>();
            IEnumerator enumerator = this.m_QualitySettingsProperty.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    SerializedProperty serializedProperty     = (SerializedProperty)enumerator.Current;
                    QualitySettingsEditor.QualitySetting item = new QualitySettingsEditor.QualitySetting
                    {
                        m_Name         = serializedProperty.FindPropertyRelative("name").stringValue,
                        m_PropertyPath = serializedProperty.propertyPath
                    };
                    item.m_PropertyPath = serializedProperty.propertyPath;
                    List <string>      list2 = new List <string>();
                    SerializedProperty serializedProperty2 = serializedProperty.FindPropertyRelative("excludedTargetPlatforms");
                    IEnumerator        enumerator2         = serializedProperty2.GetEnumerator();
                    try
                    {
                        while (enumerator2.MoveNext())
                        {
                            SerializedProperty serializedProperty3 = (SerializedProperty)enumerator2.Current;
                            list2.Add(serializedProperty3.stringValue);
                        }
                    }
                    finally
                    {
                        IDisposable disposable;
                        if ((disposable = (enumerator2 as IDisposable)) != null)
                        {
                            disposable.Dispose();
                        }
                    }
                    item.m_ExcludedPlatforms = list2;
                    list.Add(item);
                }
            }
            finally
            {
                IDisposable disposable2;
                if ((disposable2 = (enumerator as IDisposable)) != null)
                {
                    disposable2.Dispose();
                }
            }
            return(list);
        }
        private List <QualitySettingsEditor.QualitySetting> GetQualitySettings()
        {
            List <QualitySettingsEditor.QualitySetting> qualitySettingList = new List <QualitySettingsEditor.QualitySetting>();

            foreach (SerializedProperty serializedProperty1 in this.m_QualitySettingsProperty)
            {
                QualitySettingsEditor.QualitySetting qualitySetting = new QualitySettingsEditor.QualitySetting()
                {
                    m_Name = serializedProperty1.FindPropertyRelative("name").stringValue, m_PropertyPath = serializedProperty1.propertyPath
                };
                qualitySetting.m_PropertyPath = serializedProperty1.propertyPath;
                List <string> stringList = new List <string>();
                foreach (SerializedProperty serializedProperty2 in serializedProperty1.FindPropertyRelative("excludedTargetPlatforms"))
                {
                    stringList.Add(serializedProperty2.stringValue);
                }
                qualitySetting.m_ExcludedPlatforms = stringList;
                qualitySettingList.Add(qualitySetting);
            }
            return(qualitySettingList);
        }
Exemple #3
0
        private List <QualitySettingsEditor.QualitySetting> GetQualitySettings()
        {
            List <QualitySettingsEditor.QualitySetting> list = new List <QualitySettingsEditor.QualitySetting>();

            foreach (SerializedProperty serializedProperty in this.m_QualitySettingsProperty)
            {
                QualitySettingsEditor.QualitySetting qualitySetting  = default(QualitySettingsEditor.QualitySetting);
                QualitySettingsEditor.QualitySetting qualitySetting2 = qualitySetting;
                qualitySetting2.m_Name         = serializedProperty.FindPropertyRelative("name").stringValue;
                qualitySetting2.m_PropertyPath = serializedProperty.propertyPath;
                qualitySetting = qualitySetting2;
                qualitySetting.m_PropertyPath = serializedProperty.propertyPath;
                List <string>      list2 = new List <string>();
                SerializedProperty serializedProperty2 = serializedProperty.FindPropertyRelative("excludedTargetPlatforms");
                foreach (SerializedProperty serializedProperty3 in serializedProperty2)
                {
                    list2.Add(serializedProperty3.stringValue);
                }
                qualitySetting.m_ExcludedPlatforms = list2;
                list.Add(qualitySetting);
            }
            return(list);
        }