UE5 Symbols Flashcards

1
Q

UPROPERTY Macro

A

Definition:
Macro used to declare UObjects properties for reflection and editing.

Example:
UPROPERTY(EditAnywhere) int MyProperty;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

UFUNCTION Macro

A

Definition:
Macro used to declare UObjects functions for Blueprint exposure and networking.

Example:
UFUNCTION(BlueprintCallable) void MyFunction();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

UCLASS Macro

A

Definition:
Macro used to declare a new UObject-derived class.

Example:
UCLASS(Blueprintable) class MyActor : public AActor { /* … */ };

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

AActor Class

A

Definition:
The base class for all actors in Unreal Engine, providing functionality for placement in a level.

Key Functions:
BeginPlay(), Tick(), OnHit()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Constructor Helpers

A

Definition:
Special functions in C++ classes used to set up default values and initialize components.

Example:
MyActor::MyActor() { /* … */ }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Components

A

Definition:
Modular parts of an actor that can be added, modified, and interacted with.

Examples:
UStaticMeshComponent, UAudioComponent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Delegates and Events

A

Definition:
Mechanisms for implementing callback functions and handling events in Unreal Engine.

Example: DECLARE_DYNAMIC_MULTICAST_DELEGATE(FMyDelegate);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

GameMode Class

A

Definition:
Class defining the rules and gameplay for a specific game type.

Example:
class AMyGameMode : public AGameModeBase { /* … */ };

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Collision Handling

A

Definition:
Managing interactions between objects in the game world.

Functions:
NotifyHit(), NotifyBeginOverlap(), NotifyEndOverlap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

PlayerController

A

Definition:
Handles player input and manages the player’s viewport.

Functions:
SetupInputComponent(), Possess(), UnPossess().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

AIController Class

A

Definition:
Handles the behavior of AI-controlled characters in the game.

Example:
class AMyAIController : public AAIController { /* … */ };

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

UE_LOG Macro

A

Definition:
Macro for logging messages to the output log in the editor.

Example:
UE_LOG(LogTemp, Warning, TEXT(“This is a warning message”));

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

BlueprintCallable Functions

A

Definition:
C++ functions marked to be accessible and callable from Blueprints.

Example:
UFUNCTION(BlueprintCallable) void MyFunction();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Function Overriding

A

Definition:
Replacing or extending the functionality of a base class function in a derived class.

Example:
virtual void BeginPlay() override;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Async Tasks

A

Definition: Performing tasks asynchronously to avoid blocking the main thread.

Example:
Async(EAsyncExecution::Thread, { /* … */ });

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

: :

A

This operator is known as the scope resolution operator. It is used to qualify names in namespaces, classes, and structures.

namespace MyNamespace {
int myVariable;
}
// Accessing the variable within the namespace //

int main() {
int value = MyNamespace::myVariable;
return 0;
}

class MyClass {
public:
int myMemberFunction();
};
// Accessing a member function of the class//

int MyClass::myMemberFunction() {
// Function implementation
return 42;
}

17
Q

->

A

This operator is used to access a member of a pointer to an object. It is commonly used with pointers to access members of objects dynamically allocated on the heap or created with new.

// Assume we have a class definition like this://

class MyClass {
public:
int myVariable;
void MyFunction() {
// Function implementation//
}
};

// Create an instance of MyClass dynamically on the heap//

MyClass* myObject = new MyClass();

// Accessing a member variable using ->//

int variableValue = myObject->myVariable;

// Calling a member function using ->//

myObject->MyFunction();

// Don’t forget to free the memory when done//

delete myObject;

18
Q

*

A

The * symbol is used for several purposes, primarily related to pointers and references.

  1. Pointer Declaration:

// Declare a pointer to an integer
int* MyPointer;

2.	Pointer Dereferencing:

// Access the value pointed to by MyPointer
int value = *MyPointer;

3.	Dynamic Memory Allocation:

// Allocate memory for an integer on the heap
int* dynamicInt = new int;

4.	Pointer Arithmetic:

// Move the pointer to the next integer in an array
MyPointer++;

5.	Reference Declaration:

// Declare a reference to an integer
int myVariable = 42;
int& MyReference = myVariable;

6.	Function Return Type (Pointer):

// Function returning a pointer
int* MyFunction();

7.	Wildcard Character (Unreal Engine Macro):

// Used as a wildcard character in UE4/UE5 macros
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = “MyCategory”)
int* MyVariable;

19
Q

Namespace

A

A way to organize code and prevent naming conflicts. It provides a method for grouping related code elements, such as classes, functions, and variables, under a common name.

Here’s a basic example:

// MyNamespace.h
#pragma once

namespace MyNamespace {
class MyClass {
public:
void MyFunction();
}

int MyVariable; }

// MyNamespace.cpp
#include “MyNamespace.h”

void MyNamespace::MyClass::MyFunction() {
// Function implementation
}

In this example:

•	MyNamespace is a namespace that encapsulates MyClass and MyVariable.
•	MyClass is a class defined within the MyNamespace namespace.
•	MyFunction is a member function of MyClass.
•	MyVariable is a variable declared within the MyNamespace namespace.