How to learn unity script?

Well I’ve read unity essentials, and made the project. And its made me competent with the interface aspect of unity. But I still have no clue how to script on my own, where is a place to learn javascript and the commands for unity? Because I think I could make a complete game if only I learned the scripting part. Anyways, thanks.

Also I prefer to learn javascript because I did focus on that in the book. So i know a bit more of that then C#

A nice place to start for a beginner (Atleast for me) Is to begin with Javascript, Because I think it is the most simple. First you can learn basic Javascript (Tons of tutorials on youtube!) Etskii tutorials is a REALLY Good tutorial maker, Because he gives Visual representations as a normal schoolteacher would.
The first tutorial for Javascript tutorial is HERE- http://www.youtube.com/watch?v=5cRqu_tXIBY

Next, Don’t be afraid to test out basic scripts, And learn from others’ scripts. Here’s an example of one of MY Scripts, While watching the tutorial, You should look at how Variables are used, And booleans, Because that is all I used in the script. var Item1Texture : Texture;var Item2Texture : Texture;var Item3Texture : Tex - Pastebin.com

Hope that gets you started :slight_smile:

Recommend learning C# first, seems to be the language most people are using, and is much more powerful. Here’s some tutorials:

http://www.csharp-station.com/Tutorial.aspx

Here’s a complete book (pdf) you can download:

Here’s a great set of tutorials, that will have you making your own RPG in no time, in C#:

And here’s where Unity is talking about their official tutorials coming up, which are in C#:

http://blogs.unity3d.com/2012/09/11/learn-unity-update-1/

Of course, if you still want to learn UnityScript, you can use the Walker boys tutorials:

http://walkerboystudio.com/html/unity_training___free__.html

(you’ll want to look at the “fundamentals of Javascript and programming basics”)

And you can Read the documentation here:

http://unity3d.com/support/documentation/

And then there’s the old tutorials, in Unityscript:

Have fun!

1 Like

It’s really not. Unityscript is fine, and has easier syntax for working with Unity (as it should, since it’s a custom language). The only real problem is that there is (still!) no official documentation, which causes people to think it lacks features which it actually has.

–Eric

This isn’t the place to argue over “more powerful”, I understand you like UnityScript and it’s fine to code in. So let’s just disagree on this one.

@Jaimi,
Why do you think C# is more powerful? Can you elaborate? Does it process faster? What are the reasons for your claim?

It’s not doing newcomers any favors if you describe a language as “much more powerful” when it’s objectively not. There are some C# features which Unityscript lacks, but there are also some Unityscript features that C# lacks. If the OP says they prefer Unityscript, then just accept that rather than trying to evangelize. It’s really tedious. Arguments about languages should stay in the “which language should I use” topics. (Of which there are an infinite number. :wink: )

@renman3000: really not the place. This topic is called “How to learn unity script?”

–Eric

I think we have forgotten the real point here, How can I learn javascript again?

http://forum.unity3d.com/threads/34015-Newbie-guide-to-Unity-Javascript-(long)

About arrays/collections: http://wiki.unity3d.com/index.php/Which_Kind_Of_Array_Or_Collection_Should_I_Use%3F

Might also be useful: http://wiki.unity3d.com/index.php/Head_First_into_Unity_with_UnityScript

–Eric

@3, sorry to bomb your thread.
Just ask. I leant Torque, having no programming background over a year. I learnt by asking questions on the boards. Some people hate that, but it was the only method I knew, and it worked. I continued to work with Torque for another year, before realizing the extreme limits of that engine vs Unity. So I learnt Unity, and chose JS as my language since I prefer it’s syntax. How I leant was ask and study. It took me only a month to get a grip. A year later I am very comfortable with it.

Hope that helps.

Try their lunar lander tutorial series.

You’ll notice I posted tutorials to both Unityscript and C#. And it is a fact, that the new tutorials are coming in C#, which seems to show a shift in importance of the language. And his “preference for Javascript” was added as an edit after my reply, so I think you are being a bit too harsh here.

Look at this part of my reply:

Thank you, that should be enough to get me started for awhile.

High Score

Eric5h5 - 1
Jaimi - 0

Tutorials are great and teach you more than just code, and that is important because Unity has a lot more to it than just the scripting.

When I started to learn UnityScript/Js I collected all the scripts I could find from where ever and used them for references. But the biggest help and don’t code without it guide is the documentation. I used Js in DX studio and that prepared me for Unity. I also Learned a lot about Js from the Microsoft Learn: Build skills that open doors in your career…=vs.71%29.aspx site.

Thanks a lot to everyone who posted here, I have no coding experience except Python at school (I’m 15) and I want some kind of early start into programming, even if it starts with UnityScript which publicly seems to be simpler to learn while many say C# is more complex, but therefore more… ‘powerful’ - able to do more difficult functions and that. I’m saying no more

C# is actually easier to learn than unity script. People who don’t know C# are afraid of C#, because it has a “C” in it.
It’s an irrational fear, C# isn’t really like C or C++… It’s more friendly and up to date than those languages. It’s closer to VB.Net than anything else, and yet people aren’t afraid of VB.Net, because it has “VB” in it.

-The unity implementation of C# is close enough that most C# coding examples that have nothing to do with unity are still applicable to coding in C# with unity, and the web is absolutely littered with C# code and tutorials that you will use to learn.
-It’s infinitely less littered with unity script examples, especially recently, and javascript tutorials aren’t really going to help you at all.
-The official unity tutorials, and most other unity tutorials these days have moved to C#. Just about the entire unity community has moved to C# since this thread was first posted in 2012.

If someone picks unityscript, it better be because of preference, not because they think it’s going to be easier to learn.

3 Likes

Yeah, be cautious of using three year old comparison threads. The whole community has shifted in the direction of C# dramatically over that time. Don’t get me wrong, there is still a sizable JavaScript community. But its less then 20% of users.

Not interested in getting into a language debate here. But I strongly suggest you check out more recent threads on the topic.

1 Like

Unity3Dstudent’s Will Goldstone’s tutorials are great but i do recommend c# it’s not that hard just learn the syntax and you’ll be fine.

Doesn’t stop you from doing so. As usual …

Folks, this is a UNITY JAVASCRIPT thread. An old one too. No need to necro this for stating your crazy love to C#