(C#) How to access enum from a remote object?

Hey guys I was wondering how I might be able to access a remote enum in C#. Right now i have this enum setup in a kinda global “meta” object. I was planning on using this as a sort of index for my layers.

public enum Layers {
playerActorLayer = 8,
civilianActorLayer = 9,
enemyActorLayer = 10,
};

Now I try and grab this in the awake function of my other script as follows

myLayers = GameObject.Find("debug_terrain").GetComponentInChildren<enumLayers>();

Which should grab the script component with the public enum from the child object it’s living in on my terrain. However I can’t seem to access myLayers.Layers in the other scirpt. Am I not handling this the right way? I have the enum scroped public. Is there something specific to enums that I am missing?

The enum is a global static thing scoped by the class it belongs to so it looks like you should be accessing it like this:

  enumLayers.Layers

All an Enum is a glorified int. I believe you fundamentally misunderstand it.

public enum NumberEnum{
One = 1,
Two = 2,
Joker= 3,
}

void Awake(){
var one = 1;
var two = 2;
var three = 3;

if(one == (int)NumerEnum.One)
 Debug.Log("One");
if(two == (int)NumerEnum.Two)
 Debug.Log("Two");
if(three== (int)NumerEnum.Joker)
 Debug.Log("Joker");
}