You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
86 lines
4.7 KiB
Plaintext
86 lines
4.7 KiB
Plaintext
Availability:Public
|
|
Title:Programming Basics
|
|
Crumbs: %ROOT%, Programming
|
|
Description:Information for programmers developing with Unreal Engine.
|
|
|
|
## Overview
|
|
|
|
An individual game is defined by a game project that contains all of the code, content, and settings specific to that particular game. Gameplay code is contained within one or more
|
|
gameplay modules, and each game project must contain at least one module. The content, such as art assets, sounds, etc., is imported into the editor and saved into
|
|
packages and maps. Configurable settings for the game are defined in [configuration files](Programming/Basics/ConfigurationFiles) which are loaded at startup. Together these form the basis for
|
|
every game made with Unreal Engine.
|
|
|
|
|
|
[REGION:raw]
|
|

|
|
[/REGION]
|
|
|
|
|
|
The [Creating a Game Project](Engine/Basics/Projects/Browser#creatingnewprojects) page walks you through the steps of creating a new game project. Once you have created your game project, you should familiarize yourself
|
|
with the [](Engine/Basics/DirectoryStructure) of the project. This will help you to know what any existing files represent and what goes where when adding new files to the project. You can
|
|
also supply [](Programming\Basics\CommandLineArguments) when running the editor with your project to do things like jump straight into game preview mode or start on a particular map.
|
|
|
|
|
|
## Modules
|
|
|
|
[INCLUDE:Programming/Modules/Gameplay#Intro]
|
|
|
|
See the [](Programming/Modules/Gameplay) page for details on creating and using gameplay modules.
|
|
|
|
|
|
#### Module APIs
|
|
|
|
Functions and classes that need to be accessed outside of their module must be exposed via the `*_API` macros. Each item that is exposed comes with a compile-time cost, so be sure to only expose what is needed. If you only need access to a single function in a class, exposing just that function instead of the class can save a significant amount of time when compiling.
|
|
|
|
See the [](Programming/Modules/API) page for more details on exposing classes and functions to other modules.
|
|
|
|
## Classes
|
|
|
|
Gameplay classes are defined using standard C++ header files and syntax in conjunction with special macros defined in the engine to help with defining aspects of the classes unique to Unreal Engine.
|
|
|
|
See the [](Programming/UnrealArchitecture/Reference) for a complete explanation of class structure and creation.
|
|
|
|
### Class Implementation
|
|
|
|
At the most fundamental level, an **Actor** is any gameplay Object that you can place in a level. All Actors extend from the `AActor` class, which is the base class of _spawnable_ gameplay Objects.
|
|
|
|
Actors can be thought of, in one sense, as containers that hold special types of **Objects** called [Components](Programming/UnrealArchitecture/Actors/Components). For instance, a _CameraActor_ contains a _CameraComponent_.
|
|
|
|

|
|
|
|
The functionality of a camera, like the field of view, is all contained within the _CameraComponent_. That means that the _CameraComponent_ can be included in other Actors, like a Character,
|
|
to give the same camera functionality to those Objects.
|
|
|
|

|
|
|
|
Different types of components can be used to control how Actors move, how they are rendered, and many other parts of their functionality. All Objects, including Components, extend from the
|
|
UObject class, which is the base class of all gameplay Objects. This means they cannot be directly instanced into the world; they must belong to an Actor.
|
|
|
|
Each Actor or Object is a single instance of a class. The class sets up the template for the Actor or Object. It defines the variables that can be set for that Actor or Object, and the functions that
|
|
can be carried out within that Actor or Object. You can create new classes, or types of Objects and Actors, with C++ code. _Blueprint Classes_ primarily allow you to create classes that set up new Actors,
|
|
although you can extend a few Objects with _Blueprint Classes_ as well. You can also combine the two, by creating a new C++ class and then making a _Blueprint Class_ derived from that C++ class. To learn more about
|
|
creating classes so you can make new kinds of Actors and Objects, see the [Class Creation Basics](Gameplay\ClassCreation) page.
|
|
|
|
For more on Objects, Actors, and Components, see the [](Programming/UnrealArchitecture) documentation.
|
|
|
|
|
|
[OBJECT:TopicList]
|
|
[PARAM:icon]
|
|
(convert:false)
|
|
[/PARAM]
|
|
[PARAM:title]
|
|
Related Pages
|
|
[/PARAM]
|
|
[PARAM:description]
|
|
[/PARAM]
|
|
[PARAM:links]
|
|
* [](Programming\UnrealArchitecture\Reference\Classes)
|
|
* [](Programming\UnrealArchitecture\Reference\Functions)
|
|
* [](Programming\UnrealArchitecture\Reference\Properties)
|
|
* [](Programming\UnrealArchitecture\Reference\Structs)
|
|
* [](Programming\UnrealArchitecture\Reference\Interfaces)
|
|
[/PARAM]
|
|
[/OBJECT]
|
|
|
|
|