纳金网

标题: unity3d扩展脚本编辑器-UnityDevelop, An Editor for Unity JavaScript [打印本页]

作者: 会飞的鱼    时间: 2011-12-15 13:56
标题: unity3d扩展脚本编辑器-UnityDevelop, An Editor for Unity JavaScript


确切的说,unity3d的脚本编辑器使用起来是蛮不方便的,特别是对本人这种业余级写程序者。不过好像老外也有这个困扰,下文即是如何自制一个unity3d脚本编辑器,那就是UnityDevelop了。

这篇教程的英文似乎不是很难,可以直接看看学习了。
Choosing a language for Unity development is a tricky thing.  There are a lot of great reasons to use C# (like its tool ecosystem), but other, just-as-great reasons to use JavaScript (like its less verbose and more accessible nature).  The Unity f***ms have endless debates about language choice.
The availability of Intellisense with Visual Studio is a huge reason to use C#.  However, we liked the simplicity of Unity’s JavaScript, its similarity to Flash’s ActionScript, and some of its automagical features like compiler support for yield.  Ultimately we decided to use UnityScript here at Flashbang, and modified FlashDevelop to provide an editor environment with code completion.  We use FlashDevelop for our Flash work already, so this made sense.


We’ve been using this tool for over a year now, internally.  It’s still a hack–so your mileage may vary–but we’ve been quite happy with it!  It’s taken us awhile to scrounge together a release, but here it is:
Installing UnityDevelop

1) Get Windows.  UnityDevelop is a modified FlashDevelop.  Unfortunately, FlashDevelop is Windows-only, which means you’ll need to find some way to***n Windows alongside your Mac (unless you’re using Unity 2.5 by now, in which case you’re probably golden)!  We recommend using Synergy to share a keyboard/mouse between both monitors, or virtualizing Windows entirely.
If you virtualize Windows, seriously look into a stripped-down version of XP.  You can use nLite to do this yourself, or you can download a pre-made ISO if you don’t mind dipping into the shadier areas of the Internet.  This will reduce the memory footprint of XP tremendously (the popularity of Netbooks means there are endless tutorials and pre-made variants available).  If you***n multiple monitors, you probably don’t want to***n the Coherence/Unity feature, which can be slow with a ton of desktop real estate.  We***n Parallels in windowed mode.
2) Download UnityDevelop (2.9 MB).
3) You probably want the classes for Unity 2.6 (replace the files in your UnityDevelopClasses directory).
4) Unzip, and copy the UnityDevelop directory to “Crogram Files”.  There are some hard-coded paths in here; apologies if you organize your apps differently!
Creating a Project

UnityDevelop works best if you have your scripts in a single, scripts-only directory to begin with.  Open up UnityDevelop, and go to Project->Create Project.  We directly access our Unity project files via a network share; this is fine.
Select “Empty Project” as your template, give it a name, and browse to your scripts directory.  This will look like:






A “project” is just a pointer to a directory.  If you add new files in Unity, they will show up here.  If not, click the refresh icon in the “Project Explorer” pane, or, in a worst-case scenario, just restart UnityDevelop.  In general it’s easiest to make new files in UnityDevelop directly.  The same restrictions apply here, though–make sure you do all of your script renames in Unity itself (if you rename outside of Unity it’ll look like one file was deleted and the other freshly created).
Code Editing

Now, edit away!  You’ll get autocompletion for built-in Unity scripts, as well as your own files.

Hooray!
由 u8  发表
作者: tc    时间: 2012-4-5 23:28
不错啊 经典

作者: 浩劫    时间: 2012-4-6 19:32

作者: 未完结    时间: 2012-4-6 19:33
爱生活,爱纳金网,爱web3D。。。。
作者: tc    时间: 2012-4-15 23:25
加精、加亮滴铁子,尤其要多丁页丁页

作者: 菜刀吻电线    时间: 2012-4-22 23:22
路过、路过、快到鸟,列位请继续...ing

作者: tc    时间: 2012-5-30 23:18
真不错,全存下来了.

作者: tc    时间: 2012-6-19 23:22
不错哦,谢谢楼主

作者: C.R.CAN    时间: 2012-8-8 23:53
不错 非常经典  实用

作者: C.R.CAN    时间: 2012-11-11 23:23
水……生命之源……灌……

作者: C.R.CAN    时间: 2013-1-29 23:27
既来之,则看之!

作者: 晃晃    时间: 2013-2-7 00:45
我就看看,我不说话





欢迎光临 纳金网 (http://rs.narkii.com/club/) Powered by Discuz! X2.5