Displaying Current Level


I’m working on a space shooter and I just want to know how to display a simple text at the bottom left of the screen that says "Level: " and then whatever level the player is on. I’m not sure how to do this using javascript because I’m fairly new to it.

Any help is appreciated and the more detail the better.


Use Application.loadedLevelName to get the name and use a GUIText to display it.

Create a GUIText in the Hierarchy window, then set its properties as follows:

Position:  X=1, Y=0, Z=0
Text:  none (clear the "Gui Text" original)
Anchor:  lower right
Alignment: right

Adjust also the Font, Size and Style, then create a script like this and assign it to the GUIText:

function Start(){
  guiText.text = Application.loadedLevelName;