Search Unity

How to learn unity script?

Discussion in 'Scripting' started by 3, Sep 17, 2012.

  1. 3

    3

    Joined:
    Sep 16, 2012
    Posts:
    387
    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#
     
    Last edited: Sep 17, 2012
  2. RoflBloxa

    RoflBloxa

    Joined:
    Sep 10, 2012
    Posts:
    10
    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. http://pastebin.com/mrDWrWSQ

    Hope that gets you started :)
     
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Recommend learning C# first, seems to be the language most people are using, and is much more powerful. Here's some tutorials:

    http://msdn.microsoft.com/en-us/library/aa288436(v=vs.71).aspx
    http://catlikecoding.com/unity/tutorials/
    http://www.csharp-station.com/Tutorial.aspx

    Here's a complete book (pdf) you can download:
    http://www.c-sharpcorner.com/UploadFile/mahesh/csp08202007084545AM/csp.aspx

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

    http://www.burgzergarcade.com/hack-slash-rpg-unity3d-game-engine-tutorial

    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:

    http://unity3d.com/support/resources/tutorials/3d-platform-game
    http://unity3d.com/support/resources/tutorials/car-tutorial

    Have fun!
     
    Last edited: Sep 17, 2012
    unity_a7qFQtzzZGNslw likes this.
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    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
     
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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.
     
  6. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    @Jaimi,
    Why do you think C# is more powerful? Can you elaborate? Does it process faster? What are the reasons for your claim?
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    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. ;) )

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

    --Eric
     
  8. 3

    3

    Joined:
    Sep 16, 2012
    Posts:
    387
    I think we have forgotten the real point here, How can I learn javascript again?
     
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
  10. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    @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.
     
  11. Ebkac

    Ebkac

    Joined:
    Feb 3, 2012
    Posts:
    62
    Cgcookie.com
    Try their lunar lander tutorial series.
     
  12. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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.
     
  13. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Look at this part of my reply:

     
  14. 3

    3

    Joined:
    Sep 16, 2012
    Posts:
    387
    Thank you, that should be enough to get me started for awhile.
     
  15. BlackMantis

    BlackMantis

    Joined:
    Feb 7, 2010
    Posts:
    1,475
    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 http://msdn.microsoft.com/en-us/libr...=vs.71).aspx site.
     
  16. CrazyJoeFro

    CrazyJoeFro

    Joined:
    Dec 26, 2013
    Posts:
    1
    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
     
  17. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,304
    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.
     
    passerbycmc, Ryiah and Kiwasi like this.
  18. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    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.
     
    Ryiah likes this.
  19. Wasiim

    Wasiim

    Joined:
    May 2, 2015
    Posts:
    228
    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.
     
  20. Tiles

    Tiles

    Joined:
    Feb 5, 2010
    Posts:
    2,481
    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#
     
  21. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Actually it was a "unity scripting" thread that was retconned to a Unity Javascript thread. :)

    Just saying.