UDN
Search public documentation:
DevelopmentKitProgramming
日本語訳
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
Getting Started Programming on the Unreal Development Kit
Welcome to the Unreal Developer Network development getting started page for UDK Programmers. This page is designed to introduce programmers to the Unreal Development Kit and provide a tutorial for getting started writing code. But first... Download the latest version of UDK here!Contents
Introduction
Unreal Development Kit provides all the tools needed to make a huge variety of custom 3D applications and games. Code development in UDK uses the UnrealScript programming language, a powerful object oriented programming language with special features for game development. The full Unreal Engine 3 UnrealScript source is included as part of the UDK download, in the Development\Src subdirectory. Check out the Programming Home page for a full list of programming and technical topics, and check out the glossary of Unreal Engine terminology. For a more in depth introduction to creating your first project, check out UDK First Script Project. There are also a lot of good community developed tutorials on getting started with UDK and UnrealScript, some of which are targeted at more novice users.Development Environment
UnrealScript source files can be edited using any text editor. Each UnrealScript class should be in its own .uc extension text file. Programmers may want to use a visual Integrated Development Environment (IDE) such as Visual Studio or Pixel Mine's nFringe complete UnrealScript IDE that includes a source-level script debugger. Pixel Mine's nFringe has both a Commercial license and a 100% free strictly non-commercial license. To enable syntax highlighting for UnrealScript (.uc) and Shader (.usf - including Cg and HLSL) files in Visual Studio 2005 or Visual Studio 2008, select Options from the Tools Menu. In the dialog box, go to Text Editor -> File Extension. Add the extension uc and choose Microsoft Visual C++ as editor. Repeat for the Shader (.usf) extension.Configuring, Compiling and Testing
Run UDK once to initialize ini files before performing the following steps. Open UDKEngine.ini in the UDKGame\Config directory, and add the line ModEditPackages=MyMod to the [UnrealEd.EditorEngine] section. You can have more than one mod edit package, you'll just need to create a separate source directory for each one and add each one to the [UnrealEd.EditorEngine] section. Now you can add script source files to your application. Open the Development\Src\MyMod\Classes directory. Make sure your code files have a .uc extension so they will be recognized by the UnrealScript compiler. Here's a trivial game type variant to get started with. Place SuperFunGame in Development\Src\MyMod\Classes. From the Binaries directory run theudk dm-deck?game=mymod.superfungameYou can also change the default game type to use when none is specified in UDKGame.ini in the [Engine.GameInfo] section. Change DefaultGame and DefaultServerGame to =MyMod.SuperFunGame. Make sure your gametype implements SetGameType() so it can prevent the gametype from being overridden. To propagate this change or any other ini change into your packaged mod, you'll need to also modify the defaults in DefaultGame.ini. When UDK exits, it writes all logging from that play session to Launch.log in the UDKGame\Logs directory. UDK also supports external applications via DLL binding – functions in a Windows DLL can be called via UnrealScript.