Accessing GameObjects in Hierarchy while editing in Unity

This is sort of an unusual question but I am new to Unity and working with Tilemaps and was trying to create my own custom rule tile and I bumped into a question I cannot figure out.

The premise of the question is that I was trying to access a game object in the Unity hierarchy while the game was NOT loaded or being played. I was working with two tilemaps (one was the floor, the other the stuff on the floor). I wanted to access the floor tilemap while placing tiles on the other tilemap while editing and no matter what I did the floor tilemap would be null when searched for in my code. Here is a high level overview of what I was trying:

public class RuleTileWall : RuleTile<RuleTileWall.Neighbor> {

// This sort of works but I have to prefab an object to do so and it is only non-null in functions that are not awake or start
[SerializeField] GameObject gridObject;

//here I set the variable for my tilemaps to try and find them in Awake and Start
private GameObject bgTilemapObject;

// I tried with awake and start and this was not finding anything in the hierarchy
private void Awake()
{
     // this returns null even though it is in my hierarchy? also tried searching via tags 
     // and findObjectOfType for other objects - all returned null
     bgTilemapObject = GameObject.Find("Game Object in Hierarchy");

    // even when I serialize a field and put an object in it this was null, but in functions used after start or awake it was fine 
    Debug.Log(gridObject) //returned null even though I attached a game object
    
}

 ....}

Frankly this is a hard question to ask but perhaps it is simple in nature. Are gameObjects active when not in “Play” mode? If so, how do you get them through code while editing? Say I wanted to print the position of a game object to the console while I have NOT pressed the play button, how would I access it via a script and print that to the console? How do I access other game objects in the hierarchy from a single script when editing my game (without prefabbing everything and using “SerializeField”)

You need to make editor scripts for accessing this when not in play mode. Start(), Awake() and other methods are not called unless in play mode, you need an editor script.