Help Me plz. I Can't Access enum from other GameObject :(

Hi I’m Learning Unity Now for making Board Game.
But there’s problem when i import enum information from other GO
(Sorry for Not Good at Eng lol, but i’m trying to explain at my best)

// Fist Script _ Checking Ground State (by using Tag) _ And it Works Well

public enum GroundState
{
None, Ground, Hill, Sky //etc
}

public class GroundCheck : MonoBehaviour {

public GroundState _GS;

void OnTriggerStay(Collider other)
{
    if(other.gameObject.CompareTag("Base_Ground"))
    {
        _GS = GroundState.Ground;
    }
}

void OnTriggerExit()
{
    _GS = GroundState.None;
}

}

SecondScript

public class Player_Ctrl : MonoBehaviour {

public GameObject _DC_Up; //Direction Checker

void DirectionArrow()
{
    ***if (_DC_Up._GS!= GroundState.None)*** 

    {
        _DA_up.SetActive(true);
    }
}

}

/doesn’t work at this point (I marked as ** Bold)
error happens left side of !=
how can i contact with first script’s
Ground State _GS
/

Thank you for reading and plz help me.

It doesn’t work because you are trying to access .GS from a GameObject, but it’s a part of your script. You could get it working in a number of ways but the easiest one would be to
change

public GameObject _DC_Up;

to

public GroundCheck _DC_Up;

This will make it so if you drop your game object in the inspector, it will get only the GroundCheck component (your script) from it. Later, you can access it like you did.

I think this is what you want to do

if (_DC_Up.GetComponent<GroundCheck>()._GS!= GroundState.None)
{
     _DA_up.SetActive(true);
}