#include <InteractableSpawnSystemComponent.h>
◆ UInteractableSpawnSystemComponent()
| UInteractableSpawnSystemComponent::UInteractableSpawnSystemComponent |
( |
| ) |
|
15{
16 PrimaryComponentTick.bCanEverTick = false;
17}
◆ ClearAll()
| void UInteractableSpawnSystemComponent::ClearAll |
( |
const bool |
bClearSpawnedActors = true | ) |
|
|
overridevirtual |
ISpawnSystemInterface를 구현.
27{
29 {
30 return;
31 }
32
33 if (!bClearSpawnedActors)
34 {
36 return;
37 }
38
40
42 {
43 if (IsValid(Interactable) == false || Interactable == nullptr)
44 {
45 continue;
46 }
47
49 {
51 }
52 else
53 {
54 Interactable->Destroy();
55 }
56 }
57
59}
TArray< TObjectPtr< AInteractableActor > > SpawnedInteractableActors
Definition InteractableSpawnSystemComponent.h:49
Definition ObjectPoolingInterface.h:12
Definition PoolWorldSubsystem.h:28
void ReturnActorToPool(AActor *ActorToReturn)
Definition PoolWorldSubsystem.cpp:272
◆ CollectSpawnedTargetables()
| void UInteractableSpawnSystemComponent::CollectSpawnedTargetables |
( |
TArray< ITargetableInterface * > & |
OutTargetables | ) |
const |
|
overridevirtual |
ISpawnSystemInterface(으)로부터 재구현되었습니다.
63{
65 {
67 {
69 }
70 }
71}
Definition InteractableActor.h:16
Definition TargetableInterface.h:20
◆ DespawnInteractableActor()
| void UInteractableSpawnSystemComponent::DespawnInteractableActor |
( |
AActor * |
Interactable | ) |
|
101{
102 if (IsValid(Interactable) == false)
103 {
105 return;
106 }
107
109 {
110 return Entry == Interactable;
111 });
112
113 if (Removed == 0)
114 {
116 return;
117 }
118
120 {
122 check(Pool);
123
125 return;
126 }
127
128 Interactable->Destroy();
129}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:40
#define NAMEOF(Type)
Definition CK_UE.h:30
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:39
Definition InteractableSpawnSystemComponent.h:18
◆ GetAllSpawnedInteractableActors()
| FORCEINLINE TArray< AInteractableActor * > UInteractableSpawnSystemComponent::GetAllSpawnedInteractableActors |
( |
| ) |
const |
|
inline |
◆ GetRecentlySpawnInteractableActor()
| FORCEINLINE AInteractableActor * UInteractableSpawnSystemComponent::GetRecentlySpawnInteractableActor |
( |
| ) |
const |
|
inline |
◆ Initialize()
ISpawnSystemInterface를 구현.
21{
23}
TWeakObjectPtr< UStageManagementSubsystem > StageManagementSystem
Definition InteractableSpawnSystemComponent.h:46
◆ SpawnInteractableActor()
| AActor * UInteractableSpawnSystemComponent::SpawnInteractableActor |
( |
TSubclassOf< AActor > |
InteractableClass, |
|
|
const FVector & |
Location, |
|
|
const FRotator & |
Rotation |
|
) |
| |
75{
76 if (!InteractableClass)
77 {
78 LOG_ERROR(LogCK,
"InteractableClass가 nullptr입니다.");
79 return nullptr;
80 }
81
83
84 if (Pool == nullptr)
85 {
87 return nullptr;
88 }
89
90 AActor* Spawned = Pool->
GetActorFromPool(InteractableClass, Location, Rotation);
91
93 {
95 }
96
97 return Spawned;
98}
AActor * GetActorFromPool(TSubclassOf< AActor > ActorClass, FVector Location, FRotator Rotation)
Definition PoolWorldSubsystem.cpp:203
◆ SpawnedInteractableActors
| TArray<TObjectPtr<AInteractableActor> > UInteractableSpawnSystemComponent::SpawnedInteractableActors |
|
private |
◆ StageManagementSystem
이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: