ClearScreen

I can’t see my Main menu, unless I Delete clear Screen, anywhere I place clear screen it always clears screen.

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

}
void ShowMainMenu () {
    Terminal.ClearScreen();
    Terminal.WriteLine("eh");
    Terminal.WriteLine("Balls");
    Terminal.WriteLine("had enough of this stuff");
}

// Update is called once per frame
void Update()

Hi Paul,
Have you tried to remove the script from the game object and to reattach it?

Hi Nina I have remade the script like 10 times now, and that’s no joke. each time getting lesser and lessor amount of words. I’ve also tried to copy the tutors scripts same results. I don’t know what to do. the only thing i can do is just delete ClearScreeen but i know if i don’t solve this it will bite me in the future.

I’ve also just tried your suggestion doesn’t work.

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

public class Hacker : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        ShowMainMenu();
    }

    void ShowMainMenu()
    {
        Terminal.ClearScreen();
        Terminal.WriteLine("HackMan 2.0");
        Terminal.WriteLine("(TM) Fury Industries");
        Terminal.WriteLine("Scan Complete...");
        Terminal.WriteLine("3 Hubs Found (Choose one)");
        Terminal.WriteLine("1) Easy");
        Terminal.WriteLine("2) Medium");
        Terminal.WriteLine("3) Hard");
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

My original script

Your code looks fine. The ClearScreen() method is supposed to clear the screen at the beginning when the code block of the ShowMainMenu() method gets executed. If the other messages don’t show up on the terminal screen and if there are not any error messages in your console, there might be a problem with Ben’s and Rick’s classes.

Delete the WM2000 from your Hierarchy and from your Assets folder. Download the provided package again, import it again and drag the WM2000 folder into the scene. Then attach your script to a game object as you did before.

Which version of Unity do you use?

If nothing helps, download Ben’s and Rick’s project from GitHub and open it in Unity. If the issue persists there, something is wrong with your Unity installation.

I’m using latest Unity and latest Visual studio, I will try what you have suggested

It worked, thanks alot! :wink:

Awesome! :slight_smile:


See also:

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

Privacy & Terms