46 uint8_t m_bHasFinishedSpawning : 1;
52 uint8_t m_bActorInitialized : 1;
57 static uint32_t m_BeginPlayCallDepth;
62 std::shared_ptr<UChildActorComponent> m_ParentComponent;
69 enum class EActorBeginPlayState : uint8_t
80 EActorBeginPlayState m_ActorHasBegunPlay : 2;
87 uint8_t m_bActorBeginningPlayFromLevelStreaming : 1;
92 uint8_t m_bActorWantsDestroyDuringBeginPlay : 1;
97 uint8_t m_bAutoDestroyWhenFinished : 1;
104 void PostSpawnInitialize(
FTransform const& SpawnTransform,
AActor* InOwner, APawn* InInstigator,
bool bRemoteOwned,
bool bNoFail,
bool bDeferConstruction);
107 virtual UWorld* GetWorld()
const override final;
110 bool HasActorBegunPlay()
const {
return m_ActorHasBegunPlay == EActorBeginPlayState::HasBegunPlay; }
116 void DispatchBeginPlay(
bool bFromLevelStreaming =
false);
122 virtual void SetOwner(
AActor* NewOwner);
125 void FinishSpawning(
const FTransform& Transform,
bool bIsDefaultTransform =
false);
135 if (Arg == TestOwner)
144 void PostActorConstruction();
158 OutComponents.SmartReset();
161 typename std::vector<std::shared_ptr<UActorComponent>>::const_iterator iterator = m_OwnedComponents.GetElements().begin();
165 while (iterator != m_OwnedComponents.GetElements().end())
168 if (tempSceneComponent !=
nullptr)
170 OutComponents.Add(tempSceneComponent);
188 OutComponents.SmartReset();
191 typename std::vector<std::shared_ptr<UActorComponent>>::const_iterator iterator = m_OwnedComponents.GetElements().begin();
195 while (iterator != m_OwnedComponents.GetElements().end())
198 if (tempSceneComponent !=
nullptr)
200 OutComponents.Add(tempSceneComponent);
206 void SetInstigator(APawn* InInstigator);
218 static void DispatchOnComponentsCreated(
AActor* NewActor);
226 return ActorToWorld();
232 return (m_RootComponent ? m_RootComponent->GetComponentTransform() : FTransform::m_Identity);
240 void InitializeComponents();
248 virtual void PostInitializeComponents();
255 AActor* GetParentActor()
const;
264 void RemoveOwnedComponent(std::shared_ptr<UActorComponent> Component);
266 bool GetAutoDestroyWhenFinished()
const {
return m_bAutoDestroyWhenFinished; }
268 static USceneComponent* FixupNativeActorComponents(AActor* Actor);
270 bool CanTick()
const {
return m_bCanEverTick; }
271 void DisableTick(
bool bDisable) { m_bCanEverTick = !bDisable; }
279 virtual void Tick(
float DeltaSeconds);
304 virtual void BeginPlay();