KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
FComponentHelper 구조체 참조

#include <FComponentHelper.h>

+ FComponentHelper에 대한 협력 다이어그램:

정적 Public 멤버 함수

template<typename T >
static T * FindComponentByName (AActor *Owner, const FName &ComponentName)
 
template<typename T >
static T * FindComponentByNameRecursive (AActor *Owner, const FName &ComponentName)
 
template<typename T >
static TArray< T * > GetAllOfClass (UWorld *World)
 
template<typename T >
static T * LoadAsset (const TCHAR *Path)
 
template<typename T >
static TSubclassOf< T > LoadClass (const TCHAR *Path)
 

상세한 설명

FComponentHelper.h 파일의 13 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ FindComponentByName()

template<typename T >
static T * FComponentHelper::FindComponentByName ( AActor *  Owner,
const FName ComponentName 
)
inlinestatic

FComponentHelper.h 파일의 34 번째 라인에서 정의되었습니다.

35 {
36 if (!IsValid((Owner)))
37 {
38 return nullptr;
39 }
40
42 Owner->GetComponents(FoundComponents);
43
44 for (T* Component : FoundComponents)
45 {
46 if (Component && Component->GetFName() == ComponentName)
47 {
48 return Component;
49 }
50 }
51 return nullptr;
52 }
static T * LoadAsset(const TCHAR *Path)

◆ FindComponentByNameRecursive()

template<typename T >
static T * FComponentHelper::FindComponentByNameRecursive ( AActor *  Owner,
const FName ComponentName 
)
inlinestatic

FComponentHelper.h 파일의 54 번째 라인에서 정의되었습니다.

55 {
56 if (!IsValid((Owner)))
57 return nullptr;
58
60 Owner->GetComponents(Components, true);
61
63 {
64 if (Component && Component->GetFName() == ComponentName)
65 {
66 return Cast<T>(Component);
67 }
68 }
69 return nullptr;
70 }

◆ GetAllOfClass()

template<typename T >
static TArray< T * > FComponentHelper::GetAllOfClass ( UWorld World)
inlinestatic

FComponentHelper.h 파일의 73 번째 라인에서 정의되었습니다.

74 {
75 static_assert(TIsDerivedFrom<T, AActor>::IsDerived, "T must derive from AActor");
76
78
79 if (!World)
80 return Result;
81
83 UGameplayStatics::GetAllActorsOfClass(World, T::StaticClass(), FoundActors);
84
85 for (AActor* Actor : FoundActors)
86 {
87 if (T* Casted = Cast<T>(Actor))
88 {
89 Result.Add(Casted);
90 }
91 }
92
93 return Result;
94 }

◆ LoadAsset()

template<typename T >
static T * FComponentHelper::LoadAsset ( const TCHAR *  Path)
inlinestatic

FComponentHelper.h 파일의 16 번째 라인에서 정의되었습니다.

17 {
18 static_assert(std::is_base_of<UObject, T>::value, "T must derive from UObject");
19
20 ConstructorHelpers::FObjectFinder<T> Obj(Path);
21 return Obj.Succeeded() ? Obj.Object.Get() : nullptr;
22 }

다음에 의해서 참조됨 : ADoor::ADoor(), ALobbyLevelScriptActor::ALobbyLevelScriptActor(), AMoviePanel::AMoviePanel(), APlayerActor::APlayerActor(), APlayerControl::APlayerControl(), AWheatly::AWheatly(), UDialogManager::UDialogManager(), UGameDataManager::UGameDataManager(), UGameSoundManager::UGameSoundManager(), UGameVFXManager::UGameVFXManager(), ULoadingCircleManager::ULoadingCircleManager(), UPopupManager::UPopupManager().

+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ LoadClass()

template<typename T >
static TSubclassOf< T > FComponentHelper::LoadClass ( const TCHAR Path)
inlinestatic

FComponentHelper.h 파일의 25 번째 라인에서 정의되었습니다.

26 {
27 static_assert(std::is_base_of<UObject, T>::value, "T must derive from UObject");
28
29 ConstructorHelpers::FClassFinder<T> Finder(Path);
30 return Finder.Succeeded() ? Finder.Class : nullptr;
31 }

이 구조체에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: