void OnEnable() { _map = (WorldMap2D)target; _headerTexture = Resources.Load <Texture2D> ("WPMF/EditorHeader"); blackBack = new GUIStyle(); blackBack.normal.background = MakeTex(4, 4, Color.black); if (_map.countries == null) { _map.Init(); } earthStyleOptions = new string[] { "Natural", "Natural (High Resolution, 8K)", "Natural (High Resolution, 16K)", "Scenic", "Scenic (High Resolution, 16K)", "Alternate Style 1", "Alternate Style 2", "Alternate Style 3", "Solid Color" }; earthStyleValues = new int[] { (int)EARTH_STYLE.Natural, (int)EARTH_STYLE.NaturalHighRes, (int)EARTH_STYLE.NaturalHighRes16K, (int)EARTH_STYLE.NaturalScenic, (int)EARTH_STYLE.NaturalScenic16K, (int)EARTH_STYLE.Alternate1, (int)EARTH_STYLE.Alternate2, (int)EARTH_STYLE.Alternate3, (int)EARTH_STYLE.SolidColor }; frontiersDetailOptions = new string[] { "Low", "High" }; isDirty = serializedObject.FindProperty("isDirty"); expandEarthSection = EditorPrefs.GetBool("WPM2DGlobeEarthExpand", false); expandCitiesSection = EditorPrefs.GetBool("WPM2DGlobeCitiesExpand", false); expandCountriesSection = EditorPrefs.GetBool("WPM2DGlobeCountriesExpand", false); expandProvincesSection = EditorPrefs.GetBool("WPM2DGlobeProvincesExpand", false); expandInteractionSection = EditorPrefs.GetBool("WPM2DGlobeInteractionExpand", false); }
void OnEnable() { Color backColor = EditorGUIUtility.isProSkin ? new Color(0.18f, 0.18f, 0.18f) : new Color(0.7f, 0.7f, 0.7f); _blackTexture = MakeTex(4, 4, backColor); _blackTexture.hideFlags = HideFlags.DontSave; _map = (WorldMap2D)target; _headerTexture = Resources.Load <Texture2D> ("EditorHeader"); if (_map.countries == null) { _map.Init(); } earthStyleOptions = new string[] { "Natural", "Solid Color" }; blackStyle = new GUIStyle(); blackStyle.normal.background = _blackTexture; }
void OnEnable() { Color backColor = EditorGUIUtility.isProSkin ? new Color(0.18f, 0.18f, 0.18f) : new Color(0.7f, 0.7f, 0.7f); _blackTexture = MakeTex(4, 4, backColor); _blackTexture.hideFlags = HideFlags.DontSave; _map = (WorldMap2D)target; _headerTexture = Resources.Load <Texture2D> ("WPMF/EditorHeader"); blackBack = new GUIStyle(); blackBack.normal.background = MakeTex(4, 4, Color.black); if (_map.countries == null) { _map.Init(); } earthStyleOptions = new string[] { "Natural", "Natural (High Resolution, 8K)", "Natural (High Resolution, 16K)", "Scenic", "Scenic (High Resolution, 16K)", "Alternate Style 1", "Alternate Style 2", "Alternate Style 3", "Solid Color" }; earthStyleValues = new int[] { (int)EARTH_STYLE.Natural, (int)EARTH_STYLE.NaturalHighRes, (int)EARTH_STYLE.NaturalHighRes16K, (int)EARTH_STYLE.NaturalScenic, (int)EARTH_STYLE.NaturalScenic16K, (int)EARTH_STYLE.Alternate1, (int)EARTH_STYLE.Alternate2, (int)EARTH_STYLE.Alternate3, (int)EARTH_STYLE.SolidColor }; frontiersDetailOptions = new string[] { "Low", "High" }; // renderViewportQualityOptions = new string[] { // "Low", // "Medium", // "High" // }; blackStyle = new GUIStyle(); blackStyle.normal.background = _blackTexture; isDirty = serializedObject.FindProperty("isDirty"); expandEarthSection = EditorPrefs.GetBool("WPM2DGlobeEarthExpand", false); expandCitiesSection = EditorPrefs.GetBool("WPM2DGlobeCitiesExpand", false); expandCountriesSection = EditorPrefs.GetBool("WPM2DGlobeCountriesExpand", false); expandProvincesSection = EditorPrefs.GetBool("WPM2DGlobeProvincesExpand", false); expandInteractionSection = EditorPrefs.GetBool("WPM2DGlobeInteractionExpand", false); }