14#include <util/ue-header-guard-begin.h>
15#include "Containers/Array.h"
16#include "Templates/Function.h"
17#include <util/ue-header-guard-end.h>
19#include "ActorDispatcher.generated.h"
51 TPair<EActorSpawnResultStatus, FCarlaActor*>
SpawnActor(
114 void OnActorDestroyed(
AActor *Actor);
Base class for Carla actor factories.
A registry of all the Carla actors.
FCarlaActor::IdType IdType
A view over an actor and its properties.
Object in charge of binding ActorDefinitions to spawn functions, as well as keeping the registry of a...
void BindNewDefinitions(ACarlaActorFactory &ActorFactory)
Bind the definitions of ActorFactory that are not bound yet.
const FActorRegistry & GetActorRegistry() const
TFunction< FActorSpawnResult(const FTransform &, const FActorDescription &)> SpawnFunctionType
void Bind(FActorDefinition Definition, SpawnFunctionType SpawnFunction)
Bind a definition to a spawn function.
void PutActorToSleep(FCarlaActor::IdType Id, UCarlaEpisode *CarlaEpisode)
const TArray< FActorDefinition > & GetActorDefinitions() const
TMap< FString, TSubclassOf< AActor > > Classes
void WakeActorUp(FCarlaActor::IdType Id, UCarlaEpisode *CarlaEpisode)
FCarlaActor * RegisterActor(AActor &Actor, FActorDescription ActorDescription, FActorRegistry::IdType DesiredId=0)
Register an actor that was not created using "SpawnActor" function but that should be kept in the reg...
bool DestroyActor(FCarlaActor::IdType ActorId)
Destroys an actor, properly removing it from the registry.
FActorRegistry & GetActorRegistry()
AActor * ReSpawnActor(const FTransform &Transform, FActorDescription ActorDescription)
ReSpawns an actor based on ActorDescription at Transform.
TPair< EActorSpawnResultStatus, FCarlaActor * > SpawnActor(const FTransform &Transform, FActorDescription ActorDescription, FCarlaActor::IdType DesiredId=0)
Spawns an actor based on ActorDescription at Transform.
TArray< FActorDefinition > Definitions
UPROPERTY so the garbage collector clears the class references when a content pack's classes are dest...
TArray< SpawnFunctionType > SpawnFunctions
void ReleaseContentPack(const FString &MountPoint)
Forget the classes of every definition that refers to content under MountPoint (a content pack being ...
A definition of a Carla Actor with all the variation and attributes.
A description of a Carla Actor with all its variation.
FActorSpawnResult()=default