Not Able to see Level in Debug Mode

Hi,

I am not able to see the Level in Debug mode (for the Hacker script at the right side).
Even I ran the game, it is not showing the level.
I am using unity 2019.1.0a14 version.
You can find the codes and the ss of the unity below.

Could you please help me to find what is wrong?

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Hacker : MonoBehaviour
{
    //Game state
    int level;

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

    void ShowMainMenu(string greeting)
    {
        Terminal.ClearScreen();
        Terminal.WriteLine(greeting);
        Terminal.WriteLine("What would you like to hack into?");
        Terminal.WriteLine("Press 1 for the local library");
        Terminal.WriteLine("Press 2 for the police station");
        Terminal.WriteLine("Enter your selection:");
    }

    void OnUserInput(string input)
    {
        //print(input == "1");

        if (input == "menu")
        {
            ShowMainMenu("Hello again Yigit");
        }
        else if (input == "1")
        {
            level = 1;
            StartGame();
        }
        else if (input == "2")
        {
            level = 2;
            StartGame();
        }
        else if (input == "3")
        {
            level = 3;
            StartGame();
        }
        else
        {
            Terminal.WriteLine("please choose a valid level");
        }
       
    }

    void StartGame()
    {
        Terminal.WriteLine("You have chosen level " + level);
    }
}

Hi Yigit,

Welcome to our community! :slight_smile:

The “a” in 2019.1.0a14 indicates that this is an alpha version. Alpha versions are usually full of bugs. “b” stands for beta, it’s not a stable version either. Please upgrade Unity to a stable version of 2019.

I also ran into this issue, but didn’t notice I had an error in the code which results in “level” not showing.

Make sure to check your console in unity. :slight_smile:

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

Privacy & Terms