UPrimeDialogForgeNetworkComponent
UPrimeDialogForgeNetworkComponent belongs to the PrimeDialog Forge runtime module.
Sed reprehenderit excepteur laboris ad nostrud veniam fugiat eiusmod reprehenderit occaecat nulla esse. Magna minim incididunt cillum amet ullamco fugiat occaecat. Adipiscing nostrud ullamco ipsum minim occaecat dolore ullamco elit cillum sint commodo voluptate enim dolor. Labore dolor esse duis tempor exercitation minim irure do esse occaecat. Pariatur consectetur ut lorem incididunt magna veniam velit ea fugiat ut adipiscing ad minim.
Declaration
1// Unit test example
2IMPLEMENT_SIMPLE_AUTOMATION_TEST(
3 FPrimeDialog ForgeBasicTest,
4 "PrimeDialog Forge.Core.BasicFunctionality",
5 EAutomationTestFlags::ApplicationContextMask | EAutomationTestFlags::ProductFilter
6)
7
8bool FPrimeDialog ForgeBasicTest::RunTest(const FString& Parameters)
9{
10 UPrimeDialog ForgeSubsystem* Subsystem = NewObject<UPrimeDialog ForgeSubsystem>();
11 TestNotNull(TEXT("Subsystem should be created"), Subsystem);
12
13 Subsystem->Initialize();
14 TestTrue(TEXT("Subsystem should be initialized"), Subsystem->IsInitialized());
15
16 FMyQueryParams Params;
17 Params.Radius = 500.0f;
18 TestTrue(TEXT("Query params should be valid"), Params.IsValid());
19
20 return true;
21}
Members
| Parameter | Type | Default | Description |
|---|---|---|---|
| MaxPoolSize | int32 | 100 | Maximum number of pooled objects |
| TickRate | float | 60.0 | Update frequency in Hz |
| bAutoActivate | bool | true | Activate on BeginPlay |
| LogVerbosity | ELogVerbosity | Warning | Minimum log level |
| ReplicationMode | ERepMode | Reliable | Network replication strategy |
Example
1// Declare delegates for event-driven communication
2DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnStateChanged, EMyState, NewState);
3DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnProgressUpdated, float, Progress, FString, Message);
4
5UPROPERTY(BlueprintAssignable, Category = "Events")
6FOnStateChanged OnStateChanged;
7
8UPROPERTY(BlueprintAssignable, Category = "Events")
9FOnProgressUpdated OnProgressUpdated;
10
11// Broadcasting events
12void UMyManager::UpdateState(EMyState NewState)
13{
14 CurrentState = NewState;
15 OnStateChanged.Broadcast(NewState);
16 OnProgressUpdated.Broadcast(GetProgress(), GetStatusMessage());
17}
Tip: For best performance, pre-allocate your pool size during loading screens rather than during gameplay.