コード例 #1
0
        private static void CreateDefaultInstance()
        {
            Debug.LogWarning("MapQualitySettings: No settings specified. To fix this, use a " +
                             "MapQualitySettingsPublisher and ensure it has a MapQualitySettings reference.\n");

            instance = CreateInstance <MapQualitySettings>();
            instance.Apply();
        }
コード例 #2
0
        public override void OnInspectorGUI()
        {
            settings = (MapQualitySettings)target;

            activeQualityLevel = QualitySettings.GetQualityLevel();

            DrawNotEditingActiveQualitySettingWarning();

            EditorGUI.BeginChangeCheck();

            RefreshQualityProperties();
            DrawPropertiesExcluding(serializedObject,
                                    serializedObject.FindProperty("Settings").name);

            GUILayout.Space(10);

            GUILayout.Label("Tile draw distances", EditorStyles.boldLabel);
            DrawTileQualityProperties();

            GUILayout.Space(10);

            GUILayout.Label("Resolution Scaling Fixed DPI Factor (Mobile / tablet devices)", EditorStyles.boldLabel);
            DrawDPIFactorProperties();

            GUILayout.Space(10);

            if ((!Application.isPlaying || MapQualitySettings.Instance == settings) && DrawPreviewToggle())
            {
                DrawQualityPreviewButtons();
            }

            if (EditorGUI.EndChangeCheck())
            {
                EditorUtility.SetDirty(target);
                settings.Apply();
            }
        }