Visual Studio 2005 and UnrealScript

来源:互联网 发布:linux扫描新增磁盘 编辑:程序博客网 时间:2024/06/05 08:28

下文摘自:http://forums.epicgames.com/showthread.php?t=602129

Visual Studio 2005 and UnrealScript


NOTE: I've only tested this on XP.
Don't know if this has been posted, but, here's a way to get VS 2005 to highlight properly with UnrealScript.

1) Create a user.dat file and fill it with (note: this is old so there are new vars)
Code:
;;;; class keywords
class
interface
struct

abstract
autoexpandcategories
dependson
collapsecategories
editinlinenew
extends
hidecategories
implements
nativereplication
noexport
notplaceable
placeable
showcategories
within

cpptext
structcpptext

DefaultProperties
defaultproperties
StructDefaultProperties
structdefaultproperties


;;;; function modifiers
client
delegate
editconst
editinline
event
exec
final
function
latent
native
preoperator
postoperator
server
simulated
singular

    
;;;; variable modifiers
coerce
config
globalconfig
init
interp
iterator
local
localized
optional
out
repnotify
transient
var


;;;; Replication keywords
Replication
replication

reliable
unreliable


;;;; State keywords
State
state

Auto
auto
Begin
begin
end
End
Ignores
ignores
goto
GotoState
gotostate


;;;; common used math operations
Dot
dot
Cross
cross


;;;; UnrealScript specific keywords
Default
default
Global
global
None
none
Static
static
Self
self
Super
super


;;;; Types
TRUE
FALSE

Array
array
BYTE
byte
DOUBLE
FLOAT
INT
Name
name
Object
object
PTRINT
QWORD
qword
SBYTE
SQWORD
String
string
SWORD
TCHAR
UBOOL
UINT
WORD


;;;; UE specific structs
FMatrix
Matrix
matrix

FQuat
Quat
quat

FRotator
Rotator
rotator

FVector
Vector
vector

FVector2D
Vector2D
vector2d
Put the usertype.dat into the folder (check your path)
C:/Program Files/Microsoft Visual Studio 8/Common7/IDE/

2) Put this in a file and name it something like
Visual-Studio-2005-UC-Syntax-Highlighting.reg
save it and run it. Note: can be saved anywhere.
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE
SOFTWAREMicrosoftVisualStudio8.0LanguagesFile Extensions.uc]
@
="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"
VS2008 Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE
SOFTWAREMicrosoftVisualStudio 9.0LanguagesFile Extensions.uc]
@
="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}" 
After completing these steps, you will have to restart VStudio if it was open.

Hope that helps!

Setup an "external tool" and assign it to a keybind.
1) In VStudio, click on the menu item Tools/External Tools...
2) Once the dialog pops up click on 'Add' button
3) Here are the settings
Title: UnrealScriptCompile (Note: this can be whatever you like)
Command: C:/Games/Unreal Tournament 3/Binaries/ut3.com
Arguments: make
4) Check 'Use Output Window' if you would like the compile output to be in your VStudio window like a normal compile does.
5) Make note of the location (I clicked on MoveUp until mine was in say the 3rd position in the "Menu contents:" window.
6) Click on Ok

How to assign a hotkey to an external tool
1) Click on Tools/Options
2) Open up the Environment section
3) Go down to the Keyboard entry
4) In the "Show commands containing" text box type in externalcommandN where N is the number your tool was in the list (remember, mine was in the 3rd position above, so 3). Assuming yours is in the third position, your textbox should say externalcommand3.
5) In the selection box below, you should see an item labeled Tools.ExtrernalCommand3.
6) Click it
7) Go to the section titled "Press shortcut keys: " and click in it
8) Hit your hot key (must have a modifier like <alt> <ctrl> etc)
9) Double-check that your hotkey doesn't conflict with an important key you'll be using (you can tell by looking in the "Shortcut currently used by:" field, if it's empty or useless to you, you're golden!)
10) BE SURE you hit the Assign button once you have the shortcut you are happy with.
 
原创粉丝点击