UE4 notes 1

At the most basic level, any game object that can be placed in a level is an Actor. All Actors are inherited from the AActor class, which is the class of all game objects that can be spawned基类。

At a certain logical level, Actors can be considered as containers that maintain some special Objects, and these special Objects are called Component. For example, a CameraActor will contain a camera component (CameraComponent).

The functions of a camera, such as the field of view, are implemented in CameraComponent. At the same time, it means that other Actors can also contain CameraComponent, such as Character, which can also have the same camera function.

Different types of components can be used to control how to use an Actor, how to render the Actor, and many other functions. All objects, including components, are inherited from the UObject class, which is also the base class of all game logic code classes (AActor also inherits from UObject). But the UObject class cannot be directly placed in the scene and instantiated. What needs to be placed in the scene and instantiated must belong to an Actor.

Each Actor or Object is a concrete instantiation object of the class. The class sets a template for the Actor or Object, which defines which variables can be used by the Actor or Object, and which functions can be called. New Actor or Object types can be created in C++ code. The blueprint is more used to create and set up Acotr, of course, you can still extend the functions or properties of certain Objects through the blueprint.

Guess you like

Origin blog.csdn.net/qq_41363459/article/details/111335775