Hi,
I am currently trying to learn the basics of Unity - most of the decent tutorials I have found imply that you have at least a basic knowledge of C#, so I am busy trying to pick up the basics of that first.
Initially, I just downloaded the free version of Unity which happens to come with 'MonoDevelop-Unity' - so I am using this to write my code and play along with the C# tutorials I have found.
The problems I am having are this (Disclaimer: I am using a Mac for this)
1) I am not sure what the differences between 'running' and 'building' code are. In MonoDevelop-Unity, there is a little play button at the top which seems to cause a little 'Terminal' box to pop up when you press it. The code seems to do it's job and the terminal box returns the following message:
Hello World!
Press any key to continue...
Have I built or run my code?
2) There are several bits of jargon that keep being thrown around, without much in the way of explanation: 'Classes', 'The Main Method', 'Namespace'. These are the main confusing terms - what do they mean and how do they apply to my code?
3) This is the main one, I would be super grateful if someone were able to provide a line-by-line explanation of what each line of this code is doing/means? I wrote it, and it makes a message appear on screen, which is fine - but I want to know what is happening (i.e. which words/parenthesis are doing what)?
Here's my code:
using System;
namespace HelloWorldTwo
{
class MainClass
{
public static void Main (string[] args)
{
Console.WriteLine ("Hello World!");
}
}
}
Console.Writeline (); is presumably telling the machine to "Write whatever is in these brackets () to the console (I assume 'console' is C# lingo for the terminal dialogue box?).
Any feedback here would be greatly appreciated.
Thanks!