“Hello World!” on Unity

Since we were about to use Unity to create a game, I decided it’d be the best platform to try to code “Hello World!” into another coding language (since we were taught to do it on Flash at college). I downloaded Unity and had never seen it before, so it took a while to find the right way to code this in, but now I have I see that it was actually quite simple.

To do a debug script on Unity you had to add  Debug.Log(“Hello World!”); into the existing code in the new C# script I made.

hello-world-code

Once I’d done that I dragged the script over the ‘main camera’ asset and clicked play, so the message popped up in the corner.

hello-world

It took a long time to get right, but once I found this method it was really simple and had no compile errors like other times I’d tried.

Advertisements

One thought on ““Hello World!” on Unity

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s