70 uint8_t m_bHasFinishedSpawning : 1;
78 uint8_t m_bActorInitialized : 1;
84 static uint32_t m_BeginPlayCallDepth;
93 std::shared_ptr<UChildActorComponent> m_ParentComponent;
108 enum class EActorBeginPlayState : uint8_t
121 EActorBeginPlayState m_ActorHasBegunPlay : 2;
129 uint8_t m_bActorBeginningPlayFromLevelStreaming : 1;
136 uint8_t m_bActorWantsDestroyDuringBeginPlay : 1;
143 uint8_t m_bAutoDestroyWhenFinished : 1;
183 bool HasActorBegunPlay()
const {
return m_ActorHasBegunPlay == EActorBeginPlayState::HasBegunPlay; }
198 void DispatchBeginPlay(
bool bFromLevelStreaming =
false);
206 virtual void SetOwner(
AActor* NewOwner);
215 void FinishSpawning(
const FTransform& Transform,
bool bIsDefaultTransform =
false);
227 for (
const AActor* Arg =
this; Arg; Arg = Arg->m_Owner)
229 if (Arg == TestOwner)
242 void PostActorConstruction();
258 OutComponents.SmartReset();
261 typename std::vector<std::shared_ptr<UActorComponent>>::const_iterator iterator = m_OwnedComponents.GetElements().begin();
265 while (iterator != m_OwnedComponents.GetElements().end())
268 if (tempSceneComponent !=
nullptr)
270 OutComponents.Add(tempSceneComponent);
294 OutComponents.SmartReset();
297 typename std::vector<std::shared_ptr<UActorComponent>>::const_iterator iterator = m_OwnedComponents.GetElements().begin();
301 while (iterator != m_OwnedComponents.GetElements().end())
304 if (tempSceneComponent !=
nullptr)
306 OutComponents.Add(tempSceneComponent);
317 void SetInstigator(APawn* InInstigator);
341 static void DispatchOnComponentsCreated(
AActor* NewActor);
371 void InitializeComponents();
379 virtual void PostInitializeComponents();
389 AActor* GetParentActor()
const;
406 void RemoveOwnedComponent(std::shared_ptr<UActorComponent> Component);
429 bool CanTick()
const {
return m_bCanEverTick; }
447 virtual void Tick(
float DeltaSeconds);
#define KARMA_API
Defining Karma's API macro for storage class information.
Definition Core.h:41
#define FORCEINLINE
Typical inlining macro for clarity.
Definition Core.h:157
#define DECLARE_KARMA_CLASS(TClass, TSuperClass)
Karma's gamecode object class declaration.
Definition GFrameworkMacros.h:44
This file contains the class UObject along with helper functions.
This file contains the class USceneComponent.
Actor is the base class for an object that can be placed or spawned in a level.
Definition Actor.h:34
USceneComponent * m_RootComponent
Definition Actor.h:489
ULevel * GetLevel() const
Definition Actor.cpp:18
AActor()
Definition Actor.cpp:12
bool GetAutoDestroyWhenFinished() const
Definition Actor.h:413
void DisableTick(bool bDisable)
Definition Actor.h:437
const FTransform & GetTransform() const
Definition Actor.h:349
virtual void BeginPlay()
Definition Actor.cpp:370
KarmaVector< AActor * > m_Children
Definition Actor.h:466
bool IsOwnedBy(const AActor *TestOwner) const
Definition Actor.h:225
AActor * m_Owner
Definition Actor.h:460
bool HasActorBegunPlay() const
Definition Actor.h:183
void GetComponents(KarmaVector< UActorComponent * > &OutComponents) const
Definition Actor.h:288
void PostSpawnInitialize(FTransform const &SpawnTransform, AActor *InOwner, APawn *InInstigator, bool bRemoteOwned, bool bNoFail, bool bDeferConstruction)
Definition Actor.cpp:426
const FTransform & ActorToWorld() const
Definition Actor.h:360
void GetComponents(KarmaVector< USceneComponent * > &OutComponents) const
Definition Actor.h:252
bool CanTick() const
Definition Actor.h:429
float m_CreationTime
Definition Actor.h:454
virtual UWorld * GetWorld() const override final
Definition Actor.cpp:23
FORCEINLINE USceneComponent * GetRootComponent() const
Definition Actor.h:325
bool IsActorBeginningPlay() const
Definition Actor.h:190
ActorComponent is the base class for components that define reusable behavior that can be added to di...
Definition ActorComponent.h:47
A component that spawns an Actor when registered, and destroys it when unregistered.
Definition ChildActorComponent.h:25
A Level is a collection of Actors (lights, volumes, mesh instances etc.). Multiple Levels can be load...
Definition Level.h:30
UObject()
Definition Object.cpp:10
A SceneComponent has a transform and supports attachment, but has no rendering or collision capabilit...
Definition SceneComponent.h:44
The World is the top level object representing a map or a sandbox in which Actors and Components will...
Definition World.h:150
Karma's std::vector wrapper.
Definition KarmaTypes.h:152