Currently both script two and script third have their own variable of the GameState type. If you want script three to use script twos gamestate, you would need a ScriptTwo variable in ScriptThird. You can set the value of this variable in the inspector, or using GetComponent. Script twos gamestate would also have to be public. Then accessing script twos gamestate in script third would be something like ScriptTwoVariableName.gameState
@pmurph03 is basically right but i’d suggest a different solution:
Something like a gamestate could be handeled with a public static variable.
So you could have a class like this to handle all this:
public class GameStateHandler{
public static GameState currentGameState = GameState.None;
}
Then you can use GameStateHandler.currentGameState to access it from anywhere.
Be caseful at this as static variables are carried over when loading scenes!
Also note that this class is not a Monobehaviour. There is no need to add it as a script somewhere, but it also will not have a Start/Awake/Update function access by itself.
EDIT:
I can only strongly suggest to have a “None” enum value to always be the first value in your enum as this will be the value that a new variable of this type will default to.