Unreal engine class hierarchy

Base classes

At the top of the hierarchy is the UObject class. All classes in the engine derive from UObject. This is a fundamental class in Unreal Engine and provides many features, such as memory management, garbage collection, reflection, serialization, networking, and more.

The next level of the hierarchy is the AActor class. AActor represents any object in the game world that can be placed whereas it’s static or moveable.

Then there is the APawn, this is the base class for all entities that can be possessed by players or AI. The most important difference with the AActor, is that the Pawn is generally associated with a Controller.

ACharacter is a subclass of APawn. It is commonly used for player characters (Player and NPC).

The most important difference with the Pawn is that the Character already embed components to facilitate the use of a humanoid character, such as a capsule or a skeleton mesh.

AController is another class that derives from AActor, and represents an AI or human-controlled agent in the game world. It is used to control the behavior of APawn (or ACharacter) objects.

Player controller vs AIController

Generally you don’t use the AController directly but use (or derive from) the Player controller or the AIController

APlayerController is used to control player input and interactions with the game world. It receives input from the player and manages the camera. It also provides access to the game’s HUD, which displays game information to the player.

AAIController, on the other hand, is used to control AI behavior in the game world. It is responsible for controlling the movement, behavior, and decision-making of AI-controlled characters or pawns. It receives information from the game world, processes that information, and makes decisions, generally via the Behavior tree.

UActorComponent is a subclass of UObject that represents a component that can be attached to an AActor object to provide additional functionality. Components can be thought of as reusable pieces of functionality that can be combined to create complex objects.

Other important classes in the hierarchy include USceneComponent, which represents a component that has a transform and can be attached to other components, and UPrimitiveComponent, which represents a component that has a shape and can be used for collision detection and rendering.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *