Files
UnrealEngineUWP/Engine/Documentation/Source/Programming/QuickStart/2/QuickStart_2.INT.udn
Matthew Clark 3e2a07019f #UE4doc #docs:
Updated Engine version

[CL 2613609 by Matthew Clark in Main branch]
2015-07-08 11:16:55 -04:00

43 lines
1.3 KiB
Plaintext

Availability: Public
Title:2 - Create a C++ Class
Crumbs:%ROOT%, Programming, Programming/QuickStart
Description:Creating a C++ class
SkillLevel: Beginner
Version: 4.9
[VAR:Steps]
[OBJECT:Navigation]
[PARAM:previous]
[Previous Step](Programming\QuickStart\1 "%Programming\QuickStart\1:title%")
[/PARAM]
[PARAM:current]
[/PARAM]
[PARAM:home]
[QuickStart Home](Programming\QuickStart)
[/PARAM]
[PARAM:next]
[Next Step](Programming\QuickStart\3 "%Programming\QuickStart\3:title%")
[/PARAM]
[/OBJECT]
[/VAR]
%Steps%
1. In the **Unreal Editor**, we can create a new C++ class with the **New C++ Class...** command, located in the **File** drop-down menu.
[![](AddCPPClass.png)](AddCPPClass.png)
2. The **Choose Parent Class** menu will open. Since **Actor** is the most basic class that can exist in an **Unreal Engine** level, we'll use the **Actor** class as our base.
[![](ChooseParentClass.png)](ChooseParentClass.png)
3. The **Name Your New Actor** menu will open. For this example, let's enter the name "FloatingActor", and then click **Create Class**.
[![](NameActorClass.png)](NameActorClass.png)
----
Now that we have created a C++ class, we can switch to **Visual Studio** to program it. `FloatingActor.cpp` will be opened for us automatically, and **Unreal Engine** will automatically compile and reload the code with our new class.
%Steps%