protected virtual void Start() { var latLonSplit = _latitudeLongitudeString.Split(','); CenterLatitudeLongitude = new Vector2d(double.Parse(latLonSplit[0]), double.Parse(latLonSplit[1])); Zoom = Zoom; // hack to invoke the body of setter CorrectCenterLatitudeLongitude(); _mapVisualizer.Initialize(this, _fileSource); _tileProvider.Initialize(this); OnInitialized(); // use this event for something }
public override void OnInspectorGUI() { MapVisualizer visualizer = target as MapVisualizer; DrawDefaultInspector(); EditorGUILayout.LabelField("Generation parameters", EditorStyles.boldLabel); visualizer.TextureWidth = EditorGUILayout.IntField("Texture Width", visualizer.TextureWidth); visualizer.TextureLength = EditorGUILayout.IntField("Texture Length", visualizer.TextureLength); visualizer.TextureScale = EditorGUILayout.Slider("Texture Scale", visualizer.TextureScale, 0.1f, 30f); EditorGUILayout.Space(); if (GUILayout.Button("Regenerate Map")) { visualizer.Initialize(); } }