You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
43 lines
1.3 KiB
Plaintext
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
----
|
|
|
|
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%
|