Problem with top line of strings/code

So I ran into a bit of an issue with this lecture. The content itself made complete sense to me, and I understand how variables/parameters work. I implemented the code the same was Ben does in the tutorial (also after the terminal.clearscreen) and it still does not appear at the top. However, If I move it lower and put it say, after one of the difficulty options, I see the variable being executed.

I ran into this issue before as well, when I was creating the welcome menu for the game - I wanted to have a line at the top that said “Welcome to Prestige Worldwide Systems” but that line wouldn’t appear until I made the font size smaller and made a \n new line above it.

I tried this technique with the greeting but still no luck. I’m going to move on for now since I do understand the concept but just wonder if anyone else is running into this or has a fix for it since I have a feeling it will come up later as > B indent preformatted text by 4 spaceslockquotewell. Thank you!

Please see my code below:

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

public class Hacker : MonoBehaviour {

// Use this for initialization
void Start () {
    ShowMainMenu("Hello Chris");
    

}

void ShowMainMenu (string greeting) {
    Terminal.ClearScreen();

    Terminal.WriteLine(greeting);
    Terminal.WriteLine("\n");
    Terminal.WriteLine("Welcome to Prestige Worldwide\n");
    Terminal.WriteLine("What would you like to hack into?\n");
    Terminal.WriteLine("Press 1 for Local Bank");
    Terminal.WriteLine("Press 2 for Transtech Synergy Corp.");
    Terminal.WriteLine("Press 3 for National Dept. of Defense\n");
    Terminal.WriteLine("Enter your selection:");
    print(greeting);
}

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

Privacy & Terms