Navigation
API > API/Plugins > API/Plugins/Water
Base class for all water body actors.
WaterBodyActors provide a spline-based workflow to create lakes, rivers, and oceans which automatically create meshes, carve landscapes, and support physics interactions.
To create a new water body this class must be derived (native or blueprint) and have the `WaterBodyType_ property changed to the specific water type. The new class will automatically have a corresponding UWaterBodyComponent specific to that water body type. The component class for each water body type can be defined in the Editor Settings.
| Name | AWaterBody |
| Type | class |
| Header File | /Engine/Plugins/Experimental/Water/Source/Runtime/Public/WaterBodyActor.h |
| Include Path | #include "WaterBodyActor.h" |
Syntax
UCLASS (MinimalAPI, Blueprintable, Config=Engine, Abstract,
HideCategories=(Tags, Activation, Cooking, Replication, Input, Actor, AssetUserData))
class AWaterBody :
public AActor ,
public IWaterBrushActorInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → AWaterBody
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
AWaterBody
(
const FObjectInitializer& ObjectInitializer |
WaterBodyActor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual float GetAudioIntensityAtSplineInputKey
(
float InKey |
WaterBodyActor.h |
|
|
TArray< AWaterBodyExclusionVolume * > GetExclusionVolumes() |
WaterBodyActor.h |
|
|
TArray< AWaterBodyIsland * > GetIslands() |
WaterBodyActor.h |
|
|
virtual UMaterialInstanceDynamic * GetRiverToLakeTransitionMaterialInstance() |
Deprecated | WaterBodyActor.h |
|
virtual UMaterialInstanceDynamic * GetRiverToOceanTransitionMaterialInstance() |
WaterBodyActor.h |
|
|
UWaterBodyComponent * GetWaterBodyComponent() |
Returns the water body component | WaterBodyActor.h |
|
virtual EWaterBodyType GetWaterBodyType() |
Returns the type of body | WaterBodyActor.h |
|
UMaterialInstanceDynamic * GetWaterMaterialInstance() |
WaterBodyActor.h |
|
|
UWaterSplineComponent * GetWaterSpline() |
Returns water spline component | WaterBodyActor.h |
|
| WaterBodyActor.h | |||
const UWaterSplineMetadata * GetWaterSplineMetadata () |
WaterBodyActor.h | ||
virtual float GetWaterVelocityAtSplineInputKey
(
float InKey |
WaterBodyActor.h |
|
|
virtual FVector GetWaterVelocityVectorAtSplineInputKey
(
float InKey |
WaterBodyActor.h |
|
|
UWaterWavesBase * GetWaterWaves() |
WaterBodyActor.h |
|
|
void OnWaterBodyChanged
(
bool bShapeOrPositionChanged, |
WaterBodyActor.h |
|
|
void SetWaterMaterial
(
UMaterialInterface* InMaterial |
WaterBodyActor.h |
|
|
void SetWaterWaves
(
UWaterWavesBase* InWaterWaves |
WaterBodyActor.h |
|
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GetActorDescProperties
(
FPropertyPairsMap& PropertyPairsMap |
WaterBodyActor.h | ||
virtual bool IsComponentRelevantForNavigation
(
UActorComponent* Component |
WaterBodyActor.h | ||
virtual bool IsHLODRelevant() |
WaterBodyActor.h | ||
virtual void NotifyActorBeginOverlap
(
AActor* OtherActor |
Actor Interface | WaterBodyActor.h | |
virtual void NotifyActorEndOverlap
(
AActor* OtherActor |
WaterBodyActor.h | ||
virtual void PostActorCreated() |
WaterBodyActor.h | ||
virtual void PostEditMove
(
bool bFinished |
WaterBodyActor.h | ||
virtual void PostRegisterAllComponents() |
WaterBodyActor.h | ||
virtual void PreDuplicateFromRoot
(
FObjectDuplicationParameters& DupParams |
WaterBodyActor.h | ||
virtual void PreInitializeComponents() |
WaterBodyActor.h | ||
virtual void PreRegisterAllComponents() |
WaterBodyActor.h | ||
virtual void SetActorHiddenInGame
(
bool bNewHidden |
WaterBodyActor.h | ||
virtual bool SetIsHiddenEdLayer
(
bool bIsHiddenEdLayer |
WaterBodyActor.h | ||
virtual void SetIsTemporarilyHiddenInEditor
(
bool bIsHidden |
WaterBodyActor.h | ||
virtual void UnregisterAllComponents
(
bool bForReregister |
WaterBodyActor.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostDuplicate
(
bool bDuplicateForPIE |
WaterBodyActor.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
WaterBodyActor.h | ||
virtual void PostInitProperties() |
WaterBodyActor.h | ||
virtual void PostLoad() |
WaterBodyActor.h | ||
virtual void PreEditChange
(
FProperty* PropertyThatWillChange |
WaterBodyActor.h | ||
virtual void Serialize
(
FArchive& Ar |
WaterBodyActor.h |
Overridden from IWaterBrushActorInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AffectsLandscape() |
Returns true if this water actor is currently setup to modify the landscape : | WaterBodyActor.h | |
virtual bool AffectsWaterMesh() |
Returns true if this water actor is currently affecting (i.e. being rendered by) a AWaterZone actor : | WaterBodyActor.h | |
virtual bool CanEverAffectWaterInfo() |
Returns true if this water actor could potentially be affecting the water info texture of an AWaterZone actor: | WaterBodyActor.h | |
virtual bool CanEverAffectWaterMesh() |
Returns true if this water actor could potentially be affecting (i.e. being rendered by) a AWaterZone actor : | WaterBodyActor.h | |
virtual TArray< UPrimitiveComponent * > GetBrushRenderableComponents() |
Returns an ordered list of components to render in the actor brush render pass (e.g. USplineMeshComponents for rivers) | WaterBodyActor.h | |
virtual void GetBrushRenderDependencies
(
TSet< UObject* >& OutDependencies |
Returns the list of objects this actor depends on to render its brush (textures, materials...) | WaterBodyActor.h | |
virtual ETextureRenderTargetFormat GetBrushRenderTargetFormat() |
Returns the format of the render target used to render this actor in the water brush | WaterBodyActor.h | |
virtual const TMap< FName, FWaterBodyWeightmapSettings > & GetLayerWeightmapSettings() |
Returns the landscape weightmap settings, per layer, for this water actor | WaterBodyActor.h | |
virtual const FWaterCurveSettings & GetWaterCurveSettings() |
Returns the curve settings for this water actor | WaterBodyActor.h | |
virtual const FWaterBodyHeightmapSettings & GetWaterHeightmapSettings() |
Returns the landscape heightmap settings for this water actor | WaterBodyActor.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CleanupInvalidStaticMeshComponents() |
Removes all invalid references in the WaterBodyStaticMeshComponents list. | WaterBodyActor.h | |
virtual void DeprecateData() |
WaterBodyActor.h | ||
const TArray< TObjectPtr< UWaterBodyStaticMeshComponent > > & GetWaterBodyStaticMeshComponents() |
WaterBodyActor.h | ||
virtual void InitializeBody() |
Initializes the water body by creating the respective component for this water body type. | WaterBodyActor.h | |
void SetWaterBodyStaticMeshComponents
(
TArrayView< TObjectPtr< UWaterBodyStaticMeshComponent > > NewComponentList, |
Sets up a new list of water body static mesh components. | WaterBodyActor.h | |
void SetWaterWavesInternal
(
UWaterWavesBase* InWaterWaves |
WaterBodyActor.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAffectsLandscape_DEPRECATED | bool | WaterBodyActor.h | ||
| bCanAffectNavigation_DEPRECATED | bool | WaterBodyActor.h | ||
| bFillCollisionUnderWaterBodiesForNavmesh_DEPRECATED | bool | WaterBodyActor.h | ||
| bGenerateCollisions_DEPRECATED | bool | WaterBodyActor.h | ||
| bOverrideWaterMesh_DEPRECATED | bool | WaterBodyActor.h | ||
| CollisionProfileName_DEPRECATED | FName | WaterBodyActor.h | ||
| CurveSettings_DEPRECATED | FWaterCurveSettings | WaterBodyActor.h | ||
| ExclusionVolumes_DEPRECATED | TArray< TLazyObjectPtr< AWaterBodyExclusionVolume > > | WaterBodyActor.h | ||
| Islands_DEPRECATED | TArray< TLazyObjectPtr< AWaterBodyIsland > > | WaterBodyActor.h | ||
| LayerWeightmapSettings_DEPRECATED | TMap< FName, FWaterBodyWeightmapSettings > | WaterBodyActor.h | ||
| MaxWaveHeightOffset_DEPRECATED | float | WaterBodyActor.h | ||
| OverlapMaterialPriority_DEPRECATED | int32 | WaterBodyActor.h | ||
| PhysicalMaterial_DEPRECATED | TObjectPtr< UPhysicalMaterial > | WaterBodyActor.h | ||
| ShapeDilation_DEPRECATED | float | WaterBodyActor.h | ||
| TargetWaveMaskDepth_DEPRECATED | float | WaterBodyActor.h | ||
| TerrainCarvingSettings_DEPRECATED | FLandmassTerrainCarvingSettings | WaterBodyActor.h | ||
| UnderwaterPostProcessMaterial_DEPRECATED | TObjectPtr< UMaterialInterface > | WaterBodyActor.h | ||
| UnderwaterPostProcessMID_DEPRECATED | TObjectPtr< UMaterialInstanceDynamic > | WaterBodyActor.h | ||
| UnderwaterPostProcessSettings_DEPRECATED | FUnderwaterPostProcessSettings | WaterBodyActor.h | ||
| WaterHeightmapSettings_DEPRECATED | FWaterBodyHeightmapSettings | WaterBodyActor.h | ||
| WaterMaterial_DEPRECATED | TObjectPtr< UMaterialInterface > | WaterBodyActor.h | ||
| WaterMeshOverride_DEPRECATED | TObjectPtr< UStaticMesh > | WaterBodyActor.h | ||
| WaterMID_DEPRECATED | TObjectPtr< UMaterialInstanceDynamic > | WaterBodyActor.h | ||
| WaterNavAreaClass_DEPRECATED | TSubclassOf< UNavAreaBase > | WaterBodyActor.h |