The type or namespace Editor could not be found (even though I have "using UnityEditor")

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

public class LogicTreeBranchEditor : Editor

Error CS0246 The type or namespace name ‘Editor’ could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharp.Player

What am I missing here?

Classes from the UnityEditor namespace can’t be packed into a build.

Make sure this class is in an Editor folder and in an assembly definition targeting tHe Editor only.

Do you need [CustomEditor(typeof(script))] above ‘public class LogicTreeBranchEditor’.