Language:
Discover
By Skill Level
By Category

UWorld::DestroyActor

Choose your OS:

Syntax

bool DestroyActor
(
    AActor * Actor,
    bool bNetForce,
    bool bShouldModifyLevel
)

Remarks

Removes the actor from its level's actor list and generally cleans up the engine's internal state. What this function does not do, but is handled via garbage collection instead, is remove references to this actor from all other actors, and kill the actor's resources. This function is set up so that no problems occur even if the actor is being destroyed inside its recursion stack.

true if destroyed or already marked for destruction, false if actor couldn't be destroyed. Removes the actor from its level's actor list and generally cleans up the engine's internal state. What this function does not do, but is handled via garbage collection instead, is remove references to this actor from all other actors, and kill the actor's resources. This function is set up so that no problems occur even if the actor is being destroyed inside its recursion stack.

true if destroy, false if actor couldn't be destroyed.

Returns

true if destroy, false if actor couldn't be destroyed.

Parameters

Parameter

Description

ThisActor

Actor to remove.

bNetForce

[opt] Ignored unless called during play. Default is false.

bShouldModifyLevel

[opt] If true, Modify() the level before removing the actor. Default is true.

ThisActor

Actor to remove.

bNetForce

[opt] Ignored unless called during play. Default is false.

bShouldModifyLevel

[opt] If true, Modify() the level before removing the actor. Default is true.

References

Module

Engine

Header

Runtime/Engine/Classes/Engine/World.h

Source

Runtime/Engine/Private/LevelActor.cpp