UE5 C++ Basics #1 - Structs, Variables

Опубликовано: 02 Ноябрь 2024
на канале: MaxMakesGames
7,570
134

I will show you how to use C++ in Unreal Engine 5 to speed up your games. Using C++ instead of blueprint is always going to be faster. Using blueprint for small tasks that don't happen often is fine, but for heavy tasks or tasks that happen often ( such as every frame ), it will get laggy very fast. To speed up your game, try doing as much as you can in c++. You can then make a child of your c++ classes in blueprint and edit/add details. How do you do that ? Well, I'll show you !

In this part 1, I will go over the basics such as creating a project using a c++ template, creating your own c++ classes, macros ( USTRUCT(), UPROPERTY() ), what every class needs ( GENERATED_BODY(), include generated, start name with F,U or A ), using Live Coding or not and how to use your c++ structs in your blueprints.

---------------------------------

Subscribe for game making tutorials, other game-making related content and to follow my projects with the dev logs !

Check out my website for my other socials and if you want to see and try the games I made: https://bit.ly/MaxMakesGames

0:00 Intro
0:30 Why C++ Instead of BP
1:00 Create Project
1:40 Template Overview
2:35 Template C++ Classes
3:50 Create a New Class
4:13 Create a Struct
6:30 Struct Specifiers
7:11 Class Name
7:39 Generated Body
9:05 Expose Variable to Blueprint
10:11 Livecoding errors
11:08 Edit Default Value
11:30 Disable Livecoding
12:25 Struct Conclusion