Navigation
API > API/Plugins > API/Plugins/Water
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- AActor
- AWaterBody
- AWaterBodyCustom
- AWaterBodyLake
- AWaterBodyOcean
- AWaterBodyRiver
References
| Module | Water |
| Header | /Engine/Plugins/Experimental/Water/Source/Runtime/Public/WaterBodyActor.h |
| Include | #include "WaterBodyActor.h" |
Syntax
UCLASS (Blueprintable, Config=Engine, Abstract,
HideCategories=(Tags, Activation, Cooking, Replication, Input, Actor, AssetUserData))
class AWaterBody :
public AActor ,
public IWaterBrushActorInterface
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UWaterBodyInfoMeshComponent > | DilatedWaterInfoMeshComponent | ||
| TObjectPtr< UWaterSplineComponent > | SplineComp | The spline data attached to this water type. | |
| TObjectPtr< UWaterBodyComponent > | WaterBodyComponent | ||
| TSubclassOf< UWaterBodyCustomComponent > | WaterBodyCustomComponentClass | ||
| int32 | WaterBodyIndex | Unique Id for accessing (wave, ... ) data in GPU buffers | |
| TSubclassOf< UWaterBodyLakeComponent > | WaterBodyLakeComponentClass | ||
| TSubclassOf< UWaterBodyOceanComponent > | WaterBodyOceanComponentClass | ||
| TSubclassOf< UWaterBodyRiverComponent > | WaterBodyRiverComponentClass | ||
| TArray< TObjectPtr< UWaterBodyStaticMeshComponent > > | WaterBodyStaticMeshComponents | ||
| EWaterBodyType | WaterBodyType | ||
| TObjectPtr< UWaterBodyInfoMeshComponent > | WaterInfoMeshComponent | ||
| TObjectPtr< UWaterSplineMetadata > | WaterSplineMetadata | ||
| TObjectPtr< UWaterWavesBase > | WaterWaves | #todo_water: This should be moved to the component when component subobjects are supported |
Constructors
| Type | Name | Description | |
|---|---|---|---|
AWaterBody
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Removes all invalid references in the WaterBodyStaticMeshComponents list. | ||
| void | |||
| float | GetAudioIntensityAtSplineInputKey
(
float InKey |
||
| TArray< AWaterBodyExclusionVolume * > | |||
| TArray< AWaterBodyIsland * > | GetIslands () |
||
| UMaterialInstanceDynamic * | Deprecated | ||
| UMaterialInstanceDynamic * | |||
| UWaterBodyComponent * | Returns the water body component | ||
| const TArray< TObjectPtr< UWaterBodyStaticMeshComponent > > & | |||
| EWaterBodyType | Returns the type of body | ||
| UMaterialInstanceDynamic * | |||
| UWaterSplineComponent * | Returns water spline component | ||
| UWaterSplineMetadata * | |||
| const UWaterSplineMetadata * | |||
| float | GetWaterVelocityAtSplineInputKey
(
float InKey |
||
| FVector | GetWaterVelocityVectorAtSplineInputKey
(
float InKey |
||
| UWaterWavesBase * | |||
| void | Initializes the water body by creating the respective component for this water body type. | ||
| bool | |||
| void | OnWaterBodyChanged
(
bool bShapeOrPositionChanged, |
||
| void | SetWaterBodyStaticMeshComponents
(
TArrayView< TObjectPtr< UWaterBodyStaticMeshComponent > > NewComponentList, |
Sets up a new list of water body static mesh components. | |
| void | SetWaterMaterial
(
UMaterialInterface* InMaterial |
||
| void | SetWaterWaves
(
UWaterWavesBase* InWaterWaves |
||
| void | SetWaterWavesInternal
(
UWaterWavesBase* InWaterWaves |
Overridden from AActor
| Type | Name | Description | |
|---|---|---|---|
| void | GetActorDescProperties
(
FPropertyPairsMap& PropertyPairsMap |
Add properties to the actor desc. | |
| bool | Indicates whether this actor contributes to the HLOD generation. | ||
| void | NotifyActorBeginOverlap
(
AActor* OtherActor |
Actor Interface | |
| void | NotifyActorEndOverlap
(
AActor* OtherActor |
Event when an actor no longer overlaps another actor, and they have separated. | |
| void | PopulatePIEDuplicationSeed
(
AActor::FDuplicationSeedInterface& DuplicationSeed |
Populate the duplication seed when duplicating the actor for PIE. | |
| void | Called when an actor is done spawning into the world (from UWorld::SpawnActor), both in the editor and during gameplay For actors with a root component, the location and rotation will have already been set. | ||
| void | PostEditMove
(
bool bFinished |
Called after an actor has been moved in the editor | |
| void | Called after all the components in the Components array are registered, called both in editor and during gameplay. | ||
| void | Called right before components are initialized, only called during gameplay | ||
| void | Called before all the components in the Components array are registered, called both in editor and during gameplay | ||
| void | SetActorHiddenInGame
(
bool bNewHidden |
Sets the actor to be hidden in the game | |
| bool | SetIsHiddenEdLayer
(
bool bIsHiddenEdLayer |
Changes bHiddenEdLayer flag and returns true if flag changed. | |
| void | SetIsTemporarilyHiddenInEditor
(
bool bIsHidden |
Explicitly sets whether or not this actor is hidden in the editor for the duration of the current editor session | |
| void | UnregisterAllComponents
(
bool bForReregister |
Unregister all currently registered components |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostDuplicate
(
bool bDuplicateForPIE |
Called after duplication & serialization and before PostLoad. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | ||
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | PreEditChange
(
FProperty* PropertyThatWillChange |
This is called when a property is about to be modified externally | |
| void | Handles reading, writing, and reference collecting using FArchive. |
Overridden from IWaterBrushActorInterface
| Type | Name | Description | |
|---|---|---|---|
| bool | Returns true if this water actor is currently setup to modify the landscape : | ||
| bool | Returns true if this water actor is currently affecting (i.e. being rendered by) a AWaterZoneActor : | ||
| bool | Returns true if this water actor could potentially be affecting (i.e. being rendered by) a AWaterZoneActor : | ||
| TArray< UPrimitiveComponent * > | Returns an ordered list of components to render in the actor brush render pass (e.g. USplineMeshComponents for rivers) | ||
| void | GetBrushRenderDependencies
(
TSet< UObject* >& OutDependencies |
Returns the list of objects this actor depends on to render its brush (textures, materials...) | |
| ETextureRenderTargetFormat | Returns the format of the render target used to render this actor in the water brush | ||
| const TMap< FName, FWaterBodyWeightmapSettings > & | Returns the landscape weightmap settings, per layer, for this water actor | ||
| const FWaterCurveSettings & | Returns the curve settings for this water actor | ||
| const FWaterBodyHeightmapSettings & | Returns the landscape heightmap settings for this water actor |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bAffectsLandscape_DEPRECATED | ||
| bool | bCanAffectNavigation_DEPRECATED | ||
| bool | bFillCollisionUnderWaterBodiesForNavmesh_DEPRECATED | ||
| bool | bGenerateCollisions_DEPRECATED | ||
| bool | bOverrideWaterMesh_DEPRECATED | ||
| FName | CollisionProfileName_DEPRECATED | ||
| FWaterCurveSettings | CurveSettings_DEPRECATED | ||
| TArray< TLazyObjectPtr< AWaterBodyExclusionVolume > > | ExclusionVolumes_DEPRECATED | ||
| TArray< TLazyObjectPtr< AWaterBodyIsland > > | Islands_DEPRECATED | ||
| TMap< FName, FWaterBodyWeightmapSettings > | LayerWeightmapSettings_DEPRECATED | ||
| float | MaxWaveHeightOffset_DEPRECATED | ||
| int32 | OverlapMaterialPriority_DEPRECATED | ||
| TObjectPtr< UPhysicalMaterial > | PhysicalMaterial_DEPRECATED | ||
| float | ShapeDilation_DEPRECATED | ||
| float | TargetWaveMaskDepth_DEPRECATED | ||
| FLandmassTerrainCarvingSettings | TerrainCarvingSettings_DEPRECATED | ||
| TObjectPtr< UMaterialInterface > | UnderwaterPostProcessMaterial_DEPRECATED | ||
| TObjectPtr< UMaterialInstanceDynamic > | UnderwaterPostProcessMID_DEPRECATED | ||
| FUnderwaterPostProcessSettings | UnderwaterPostProcessSettings_DEPRECATED | ||
| FWaterBodyHeightmapSettings | WaterHeightmapSettings_DEPRECATED | ||
| TObjectPtr< UMaterialInterface > | WaterMaterial_DEPRECATED | ||
| TObjectPtr< UStaticMesh > | WaterMeshOverride_DEPRECATED | ||
| TObjectPtr< UMaterialInstanceDynamic > | WaterMID_DEPRECATED | ||
| TSubclassOf< UNavAreaBase > | WaterNavAreaClass_DEPRECATED |