FDeltaCraftHubOnInitialized

v2.0
View as Markdown

FDeltaCraftHubOnInitialized belongs to the DeltaCraft Hub runtime module.

Elit pariatur sit ad labore ex labore eiusmod veniam tempor dolor occaecat ut excepteur. Quis ea commodo in sed fugiat ut quis. Voluptate sit elit adipiscing do sed laboris minim dolore pariatur ad duis enim.

Declaration

 1// Query the subsystem for nearby actors with filtering
 2TArray<AActor*> Results;
 3FMyQueryParams Params;
 4Params.Origin = GetActorLocation();
 5Params.Radius = 1000.0f;
 6Params.MaxResults = 10;
 7Params.bIncludeHidden = false;
 8Params.FilterClass = AMyTargetActor::StaticClass();
 9
10if (Subsystem->Query(Params, Results))
11{
12    for (AActor* Actor : Results)
13    {
14        UE_LOG(LogTemp, Log, TEXT("Found: %s at distance %.1f"),
15            *Actor->GetName(),
16            FVector::Dist(Params.Origin, Actor->GetActorLocation()));
17    }
18}

Members

Function Return Type Description
Initialize() void Set up the subsystem
Query(Params) bool Execute a spatial query
GetState() EMyState Return current state
Reset() void Reset to default state
SetConfig(Config) void Apply a configuration

Example

 1UINTERFACE(MinimalAPI, Blueprintable)
 2class UDeltaCraft HubInterface : public UInterface
 3{
 4    GENERATED_BODY()
 5};
 6
 7class IDeltaCraft HubInterface
 8{
 9    GENERATED_BODY()
10
11public:
12    UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "DeltaCraft Hub")
13    void OnPluginActivated(bool bSuccess);
14
15    UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "DeltaCraft Hub")
16    FMyResult ProcessData(const FMyInput& Input);
17
18    UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "DeltaCraft Hub")
19    bool CanExecute() const;
20};