[Solved] Having Troubles with the "enum" part of the lesson

When I start up my game, and look at the debug mode, there is no namespace. No matter what I do, it refuses to work.

public class Hacker : MonoBehaviour
{

    // Variables

    int level; //Game State

    enum Screen {  MainMenu, Password, Win };
    Screen currentScreen = Screen.MainMenu;

    // Start is called before the first frame update
    void Start()
    {
        ShowMainMenu();
    }

I’ve completed these lines (below) as close to the lesson as I can, I’m pretty sure it’s identical, so I’m curious as to why it’s not creating a namespace in unity when I start the game.

    enum Screen {  MainMenu, Password, Win };
    Screen currentScreen = Screen.MainMenu;

Edit: I fixed it, I was big dumb and was selecting the wrong item when I was debugging. Anyone who looks here, make sure you’ve selected the WM2000 folder in the project area at the bottom or you’ve pressed on the main folder named WM2000 in the hierarchy and not the WM2000 object or hacker.cs

Well done! Next time, feel free to reply in your thread and mark your answer as the solution. :slight_smile:


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms