What is the best way to go about learning Unity 3D?

So to start getting a feel for the engine, should I just Google some basic Javascript or C# tutorials? Or what is a good way to learn Javascript or C#?

Like if I did a Hello World using C# in Unity 3D, how would it work? Would there be a window that pops up in Unity that says “Hello World”? I really don’t understand much about Unity 3D or scripting.

Any help is Greatly appreciated.

P.S. I’m new to this whole gaming thing. Scripting, engines, editors, you name it. I just need a good solid starting point. All of this stuff is so confusing. Sorry if I do not understand much.

There are some excellent tutorials in the Resources section you can work your way through. They cover almost all the aspects of Unity, from beginner scripting to physics to working with various assets. This is probably the best way to get yourself up to speed, and they’re genuinely a lot of fun.

Hey there Artxuleta :slight_smile:
I too have recently started learning unity from scratch, and I’ve found the best way of learning it is trial and error. I started off by downloading the networking example and then changed the code around to see exactly how it works, then added in things and gradually changed it. When I felt like I new it well enough, I started a new project :slight_smile: I came across Unity3D about 2 weeks ago - if you recognise javascript at all then you should find it has a quite fast learning curve ^.^

Super basics of Unity are below:

to get code to run every frame, use:

function Update () {Code to run}

To get an interface, use:

function OnGUI () {GUI Buttons go in here - they cannot go in any other function}

If you would like to have an interface button popup as a result of another function, use a variable:
var foo=0;
function OtherFunction () {
foo=1;
}
function OnGUI () {
if(foo==1){
GUI.Button(Rect(20,30,40,20),“I am a button!”);
}
}

If you would like to run code when the game is loaded, use:

function Start () {Code here}

For a hello world! to appear in the Console (text in the bottom left of the editor), use print (inside a function):

print(“hello World!”);

if you would like hello world to appear onscreen, then its back to GUI:

function OnGUI () {
GUI.Label(Rect(20,20,100,80),“hello World!”);
}

Rect is used for positioning - above 20 and 20 are its X/Y co-ordinates on the screen, whilst 100 and 80 are its width and height. Screen.width and Screen.height can be used to get the games current dimensions (good for centering interface boxes on screen when divided by two)

hopefully some of that will help you out :slight_smile:

PS - make good use of the scripting reference found on support → documentation :slight_smile:

I will put out my one warning about just googling javascript tutorials. Unity uses its own version of javascript which is different from the interpreted javascript that is used in web development. A lot of concepts carry over between the two, but you might get some problems if you try to grab some javascript off of the internet and drop it into Unity.

If you’re looking for the ultimate C# resource, there’s nothing better than the MSDN (Microsoft Developer Network) documentation. It may not be the greatest resource for a C# introduction, but whenever I have a question that’s the first place I look.

I also think that the Unity tutorials are fantastic (the fact that it’s my job to make them has no influence on that at all :wink: ). I would recommend getting started by using the Unity tutorials and using google to search whenever you have a question about what a piece of code is doing.