UVoxelWaterPulseNetworkComponent

v1.0
View as Markdown

UVoxelWaterPulseNetworkComponent belongs to the VoxelWaterPulse runtime module.

Cillum amet sint nisi fugiat ea dolor elit pariatur. Enim occaecat ipsum pariatur lorem sed aliquip ea excepteur enim dolore cillum quis ipsum. Velit fugiat labore aliquip irure et adipiscing ex magna in labore minim elit cillum. Labore nostrud sed amet esse ex consectetur eiusmod labore quis tempor voluptate commodo sint. Incididunt sed nisi aliqua reprehenderit duis ipsum aliqua magna tempor velit. Commodo exercitation sit do laboris ea exercitation fugiat duis veniam aute incididunt.

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

 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};

Warning: Debug visualization has a measurable performance cost. Always disable it in shipping builds.