Sample questions
Ue Actor Component LifecycleDifficulty 1
In Unreal Engine C++, when does an Actor class's constructor run?
- aOnly the first time SpawnActor creates an instance of the class
- bEvery time the OnConstruction script reruns in the editor
- cFor the class default object and for every new instance✓
- dOnly when the actor is loaded from a saved level file
Explanation:The constructor runs whenever a new instance of the class is created, including the class default object (CDO) built at class registration, plus every spawned or loaded instance afterward.
Ue Actor Component LifecycleDifficulty 1
Where is it valid to call CreateDefaultSubobject to create a component?
- aOnly inside the owning Actor's constructor✓
- bInside BeginPlay, right before the first Tick
- cInside OnConstruction, after properties are set
- dInside any UFUNCTION marked BlueprintCallable
Explanation:CreateDefaultSubobject relies on constructor-time object initialization context and is only valid while the actor's own constructor is executing.
Ue Actor Component LifecycleDifficulty 2
What does PostInitProperties signal about an Actor at the point it is called?
- aThat all of its components have finished rendering once
- bThat its property values have been applied to the object✓
- cThat the player controller has taken control of it
- dThat the level containing it has fully finished streaming
Explanation:PostInitProperties runs right after the constructor, once the object's properties have been initialized from class defaults or an archetype, before the construction script or component registration.
Ue Actor Component LifecycleDifficulty 1
What is OnConstruction in Unreal Engine C++?
- aThe function that tears an Actor down before garbage collection
- bA callback that only Blueprint-only classes can override
- cThe physics substep that runs before every collision test
- dThe native entry point for the Actor's construction script✓
Explanation:OnConstruction is the native function corresponding to the Actor's construction script, driven by both C++ overrides and any Blueprint construction script nodes.
Ue Actor Component LifecycleDifficulty 2
In the spawn sequence of a newly created Actor, which runs first?
- aOnConstruction, before BeginPlay is ever reached✓
- bBeginPlay, before OnConstruction ever runs once
- cTick, since it fires before any setup finishes
- dEndPlay, to clear any leftover previous state
Explanation:The construction script (OnConstruction) always finishes running before BeginPlay is called on a newly spawned Actor.
Ue Actor Component LifecycleDifficulty 2
What is PostInitializeComponents responsible for signaling?
- aThat the actor was just destroyed and removed from the world
- bThat the player has pressed the first input of the session
- cThat the actor's components have been registered✓
- dThat a save game file has finished writing to disk
Explanation:PostInitializeComponents is called once the actor's components, including ones added by the construction script, have been registered and initialized.