Better way to call function from another script from editor script?

I know this has been asked a dozen times, but I’m going mad…

Is there a better way to call another scripts function from my editor script? This just feels incredibly duct taped to me. I’ve even tried moving the entire function I’m trying to call over to this script, but because this is a Editor script, not MonoBehavior, I can’t use the right variables and methods. This script just makes a little button in the inspector that I can press.

using UnityEngine;
using UnityEditor;
using System.Collections;

[CustomEditor(typeof(NavPointManager))]
public class NavPointEditor : Editor
{
	GameObject obj;
	
	
	public override void OnInspectorGUI()
	{
		serializedObject.Update();
		
		if (GUILayout.Button("Generate NavPoints", GUILayout.Width(150)))
		{
				obj = GameObject.Find("HexGrid");
				obj.SendMessage("GenerateNavPoints");
		}
	}
}

You should check if obj is found before using it. Aside from that, the search by name is the slowest one. By tag or type is better, but it’s not really a big deal if you have to wait in the editor.