Call Function From Editor Script on Start

Hello, I have multiple editor scripts to generate terrain related stuff. I am hoping to call these on start so that every time I load the game it randomizes the terrain. (The script is called TerrainStratumPainter)

For example for the textures, in a editor window: 177791-capture.png

If I press that button it does:

if(GUI.Button(buttonRect,"do painting"))
				DoPaint();

But how can I make a script to call “DoPaint” when the scene starts?

I thought it might be something like:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GenerateMap : MonoBehaviour {

	// Use this for initialization
	void Start () {
		TerrainStratumPainter<>.DoPaint;
	}

}

But it doesn’t work

You’ll probably want to make use of the ExecuteInEditMode script modifier. From there I would expect that you need to use the Awake function for something to happen as soon as you open the project (or change scene).