Pages: [1]   Go Down
  Print  
Author Topic: Setting Up Your Scripting Zone  (Read 1314 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
thylaxene
Global Moderator
Newbie
****

Karma: +9/-0
Offline Offline

Posts: 73



WWW
« on: June 01, 2009, 11:04:09 PM »

Hi all,

In this thread I will post my thoughts (and hopefully others will contribute theirs as well) on setting up your workstation for scripting in Unity.

Also i'll post resources that I find helpful for scripting from time to time as well.

Cheers.
Logged

- a Unity user since 2005
www.thylaxene.com
thylaxene
Global Moderator
Newbie
****

Karma: +9/-0
Offline Offline

Posts: 73



WWW
« Reply #1 on: June 01, 2009, 11:40:45 PM »

Hi all,

First post in setting up your Unity scripting zone.

Scripting IDE - IDE = Intregrated Development Environment

Do not underestimate the importance of this application or group of applications. The IDE if it is a good one will keep you sane in medium to larger projects, and even small ones. The IDEs like Xcode are the one-stop development environment for creating desktop applications on the Mac. But for Unity development an IDE is actually made up of two components; 1. Unity Editor itself is an IDE, it allows you to combine all the components that make up a game into a unified whole, then "compiles" it ready for turning into a "Player", which is basically just a application, for either Web, Desktop, iPhone or a Widget for Dashboard.

However Unity Editor is missing one very important component to this development process, that is 2. An integrated script editor. Now Unity Technologies did the smart move in my opinion it made that a separate application. Because that gives us - the end user - choice! Choice is great, because in the real world, what i find beatiful you will probably find ugly. So choice in software packages is good.

So what script editor should I use? Well that depends on what language you want to program in and closely related what platform you are developing on, OSX or Windows?

http://www.unifycommunity.com/wiki/index.php?title=Programming_Introduction

OK so why don't I just use the supplied script editor that comes wit Unity? Well you can and if you are happy with that then you don't need this thread, just keep on coding! Wink

The Unity Wiki has a start of a list for platform specific script editors here:

http://www.unifycommunity.com/wiki/index.php?title=Script_Editors

The important thing to consider when picking a third party script editor is how easy it is to customise, and more specifically how easy is it to create/customise the syntax for a particualr language?

What is this syntax thing?

Well the syntax is all those wonderful little (hopefully insightful) words that a programming language uses to get things done, they related to two main things in a programming language, the control/variables and Application Programming Interface (API). The control is things like "if", "for" etc, variables are things like "var", "private", "static", etc. APIs stuff is "Update", "Destroy", "GetComponent" etc.

Now to be able to edit this is very important in selecting a editor for your scripts. Because even though Unity uses Javascript, Boo and C# syntaxes which covers the control and variable syntaxes for you already, Unity uses a bucket load of API calls! Having these pop-up when you type and hi-light in a nice range of rainbow colours is VERY handy. 1. to help get less bugs in you code, and 2. allow you to code quicker. Believe me when I say that 90% of your bugs when coding are mistyped words, then having 95% of those words coloured when correct is immensely helpful!

OK lets get one thing out of the way. If you are on Windows then the two kings for script editors are:
C# = Visual Studio (it's intellisense is to die for!)
JS = FlashDevelop or more precisely UnityDevelop (http://technology.blurst.com/unitydevelop-javascript-editor/)

Unfortunately on OSX the options are not as clear cut.
C#, Boo and JS = TextMate (my favourite)
JS = Espresso
This looks promising and I even started making a Unity syntax file for it... but I stopped as it had no project wide find and replace! What an oversight! Maybe in v1.1 they will fix that and I will complete my syntax file.
C# = Monodevelop (buggy, but showing promise)
C#, Boo and JS = Subethaedit (use to use this before I discovered TextMate)
C#, Boo and JS = BBedit (why use this when you can use TextMate and save some money!) Cheesy

If you pick TextMate on the Mac then grab my Syntax file for JS here:
http://www.unifycommunity.com/wiki/index.php?title=Script_Editors

Lastly whatever script editor you pick then don't forget to set the preferences in Unity so that you can double click your script to open it in your chosen editor.


Cheers.

« Last Edit: June 02, 2009, 12:21:44 AM by thylaxene » Logged

- a Unity user since 2005
www.thylaxene.com
Thomas P.
Administrator
Sr. Member
*****

Karma: +51/-0
Offline Offline

Posts: 783


Forging The Holy Poly!


WWW
« Reply #2 on: June 04, 2009, 08:53:39 PM »

Don't think I (we) are ignoring your programming info here. I love seeing what you do here. Keep going please...
Logged

-----------------------------------------------
Thomas Pasieka - Freelance 3D Artist
I am available for contract work. Please contact me.
http://www.3dattack.us
Arges
Invitation
Newbie
*

Karma: +7/-0
Offline Offline

Posts: 30



WWW
« Reply #3 on: June 05, 2009, 10:15:31 AM »

Unfortunately on OSX the options are not as clear cut.
C#, Boo and JS = TextMate (my favourite)
JS = Espresso
This looks promising and I even started making a Unity syntax file for it... but I stopped as it had no project wide find and replace! What an oversight! Maybe in v1.1 they will fix that and I will complete my syntax file.
C# = Monodevelop (buggy, but showing promise)
C#, Boo and JS = Subethaedit (use to use this before I discovered TextMate)
C#, Boo and JS = BBedit (why use this when you can use TextMate and save some money!) Cheesy

Agreed.  Monodevelop shows promise, particularly the latest version with the not-horrifyingly non-Mac GUI, but it definitely needs work.  In my case the latest version just refuses to load altogether; there is no error message, it just closes itself without a peep.

TextMate is the best option on Mac right now, and methinks well worth the cost.
Logged

Ricardo J. Méndez
Arges Systems
http://www.arges-systems.com/
Terry
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3



« Reply #4 on: June 08, 2009, 10:06:25 PM »

Looks like I should invest in TextMate instead of using Unitron.  When learning all the API calls, I sure don't want to be messing around trying to find mistakes I typed because of a bum hand.

However, I see the file on the Wiki shows the JS file is for Unity 2.1.  Is there an updates file for 2.5?
Logged

Terry

I started off with nothing...I still have most of it left.
thylaxene
Global Moderator
Newbie
****

Karma: +9/-0
Offline Offline

Posts: 73



WWW
« Reply #5 on: June 10, 2009, 05:29:19 AM »

However, I see the file on the Wiki shows the JS file is for Unity 2.1.  Is there an updates file for 2.5?

1. I'm working on an update to the JS syntax file as we speak. Another week I reckon.
2. There wasn't that much changes to the 2.1 API in 2.5. Some Editor hooks were exposed... but in my day to day use of 2.5 I haven't found too many un-coloured API syntaxes.

So rest assured you will find the 2.1 fine for everyday use... unless you are pushing the hairy end of the API and custom Editor scripts. Wink

Cheers.
Logged

- a Unity user since 2005
www.thylaxene.com
ffinder
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


« Reply #6 on: August 30, 2009, 09:21:18 AM »

If you are on Windows then the two kings for script editors are:
C# = Visual Studio (it's intellisense is to die for!)
JS = FlashDevelop or more precisely UnityDevelop (http://technology.blurst.com/unitydevelop-javascript-editor/)
You have missed another descent IDE - SharpDevelop. It supports C# and Boo "out-of-the-box".
I prefer the version 2.0 although 3.1 is out.
Logged
Winning Guy
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 5


« Reply #7 on: November 18, 2009, 01:32:19 AM »

Incredibly useful stuff!
Logged
spaz8
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


« Reply #8 on: July 01, 2010, 08:39:55 AM »

1. I'm working on an update to the JS syntax file as we speak. Another week I reckon.
2. There wasn't that much changes to the 2.1 API in 2.5. Some Editor hooks were exposed... but in my day to day use of 2.5 I haven't found too many un-coloured API syntaxes.

So rest assured you will find the 2.1 fine for everyday use... unless you are pushing the hairy end of the API and custom Editor scripts. Wink

Cheers.

Thanks, watching this thread closely.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: