UAutoMeshEngineComponent

v1.0
View as Markdown

UAutoMeshEngineComponent belongs to the AutoMesh Engine runtime module.

Labore minim sit irure quis excepteur ullamco duis aute consectetur exercitation enim ex consequat dolore. Commodo duis dolore incididunt elit ipsum commodo nisi aliqua nisi exercitation velit. Voluptate nostrud dolore sit occaecat lorem excepteur voluptate esse.

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

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

 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.