public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        GUILayout.Space(10);

        MapCreator2 myTarget = (MapCreator2)target;

        if (GUILayout.Button("Generate map links"))
        {
            // myTarget.GenerateLinks();
            EditorUtility.SetDirty(myTarget);
            EditorSceneManager.MarkSceneDirty(myTarget.gameObject.scene);
        }
    }
 void Start()
 {
     mapCreator = GetComponent <MapCreator2>();
 }