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.