UVoxelWaterPulseSettings

v2.0
View as Markdown

UVoxelWaterPulseSettings belongs to the VoxelWaterPulse runtime module.

Ea enim consequat ipsum quis fugiat nisi tempor ipsum sed. Velit ullamco dolore consectetur reprehenderit ipsum magna consectetur esse ipsum ut. Esse excepteur ex aliquip pariatur consequat nulla magna. Nostrud excepteur occaecat nostrud adipiscing velit sit labore sint fugiat commodo. Ex sit sint tempor dolor exercitation labore excepteur sint veniam.

Declaration

 1UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
 2class VOXEL_WATER_PULSE_API UMyComponent : public UActorComponent
 3{
 4    GENERATED_BODY()
 5
 6public:
 7    UMyComponent();
 8
 9    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings")
10    float UpdateInterval = 0.1f;
11
12    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings")
13    bool bAutoActivate = true;
14
15    UFUNCTION(BlueprintCallable, Category = "VoxelWaterPulse")
16    void SetConfiguration(const FMyConfig& Config);
17
18protected:
19    virtual void BeginPlay() override;
20    virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
21
22private:
23    FMyConfig CurrentConfig;
24    float TimeSinceLastUpdate = 0.0f;
25};

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

 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