- Home /
print(); to console problem - beginner
For a variable exercise, all I have to do is create a variable to print out the following sentence: Link needed 8 triforce pieces to enter Ganon's lair in the original Zelda game.
Nothing prints to the console at all, the screen just dims when I press play. Here's what I wrote-
pragma strict
public var zelda : String = "Link needed"; public var zeldaInt : int = 8 ; function Start () {
Debug.Log(zelda + zeldaInt + "triforce pieces to enter Ganon's lair in the original Zelda game.");
print(zelda);
print(zeldaInt);
}
function Update () {
}
Comment
I tested your script and it seems to work fine. Is the script attached to anything in the scene? For the script to run it must be added to a GameObject, like a cube or anything really.