corephysicsedge.Debug

v2.0
View as Markdown

corephysicsedge.Debug belongs to the CorePhysicsEdge runtime module.

Minim minim sint ea et cillum commodo sint amet duis nostrud. Magna aliquip dolore ullamco elit nostrud dolor elit lorem amet ad et incididunt. Labore ad fugiat fugiat irure commodo esse dolore quis exercitation dolore cillum excepteur minim sint. Enim tempor reprehenderit ad nulla ipsum irure labore adipiscing consequat elit ad.

Declaration

 1Blueprint Setup:
 21. Open your Actor Blueprint
 32. Add Component > search "My Plugin Component"
 43. In the Details panel, set:
 5   - Update Interval: 0.1
 6   - Auto Activate: true
 7   - Max Instances: 50
 84. Connect the OnStateChanged event to your handler
 95. Compile and Save the Blueprint

Members

Event Parameters Description
OnStateChanged EMyState NewState Fired when state transitions
OnProgressUpdated float Progress, FString Message Fired on progress change
OnError FString ErrorMessage, int32 Code Fired on error
OnInitialized bool bSuccess Fired after initialization

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}