#include <InteractionBPLib.h>
◆ GetInteractionFromComponent()
11{
12 if(Actor ==
nullptr){UE_LOG(LogInteractionBP,
Warning, TEXT(
"UInteractionBPLib::GetInteractionFromComponent Actor null"));
return nullptr;}
13 TArray<UActorComponent*> Components = Actor->GetComponentsByInterface(UInteractionInterface::StaticClass());
14 for(const auto& Component : Components)
15 {
17 if(InteractionComponent == nullptr){continue;}
18 UE_LOG(LogInteractionBP, Log, TEXT("UInteractionBPLib::GetInteractionFromComponent InteractionComponent Passed"));
19 return InteractionComponent;
20 }
21 UE_LOG(LogInteractionBP,
Warning, TEXT(
"UInteractionBPLib::GetInteractionFromComponent IInteractionInterface Component not found on %s"), *Actor->GetHumanReadableName());
22 return nullptr;
23}
Definition InteractionInterface.h:18
The documentation for this class was generated from the following files:
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/Interaction/Source/Interaction/Public/BPLib/InteractionBPLib.h
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/Interaction/Source/Interaction/Private/BPLib/InteractionBPLib.cpp