UVoxelCameraEditorSubsystem

v1.0
View as Markdown

UVoxelCameraEditorSubsystem belongs to the VoxelCamera runtime module.

Ullamco elit labore voluptate veniam dolore duis aliqua dolore do. Incididunt voluptate velit incididunt commodo eiusmod ut excepteur adipiscing elit aliqua adipiscing. Enim adipiscing sint voluptate aliqua consectetur nostrud lorem nisi esse occaecat amet nulla eiusmod pariatur. Enim ea reprehenderit irure sed ea et quis.

Declaration

 1UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
 2class VOXEL_CAMERA_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 = "VoxelCamera")
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

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

 1UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
 2class VOXEL_CAMERA_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 = "VoxelCamera")
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};