Navigation
API > API/Plugins > API/Plugins/Water
This is the API used to get information about water at runtime
| Name | UWaterSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Experimental/Water/Source/Runtime/Public/WaterSubsystem.h |
| Include Path | #include "WaterSubsystem.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, Transient)
class UWaterSubsystem : public UTickableWorldSubsystem
Inheritance Hierarchy
- FTickableObjectBase → FTickableGameObject → UTickableWorldSubsystem → UWaterSubsystem
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → UTickableWorldSubsystem → UWaterSubsystem
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UWaterSubsystem() |
WaterSubsystem.h |
Classes
| Name | Remarks |
|---|---|
| FOnWaterSubsystemInitialized |
Structs
| Name | Remarks |
|---|---|
| FScopedAllowWaterSubsystemOnPreviewWorld | Little scope object to temporarily change the value of bAllowWaterSubsystemOnPreviewWorld |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bAllowWaterSubsystemOnPreviewWorld | bool | By default, there is no water subsystem allowed on preview worlds except when explicitly requested : | WaterSubsystem.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BuoyancyManager | TObjectPtr< ABuoyancyManager > | WaterSubsystem.h |
|
|
| DefaultLakeMesh | TObjectPtr< UStaticMesh > | WaterSubsystem.h | ||
| DefaultRiverMesh | TObjectPtr< UStaticMesh > | WaterSubsystem.h | ||
| OnCameraUnderwaterStateChanged | FOnCameraUnderwaterStateChanged | WaterSubsystem.h |
|
|
| OnWaterScalabilityChanged | FOnWaterScalabilityChanged | WaterSubsystem.h |
|
|
| OnWaterSubsystemInitialized | UWaterSubsystem::FOnWaterSubsystemInitialized | WaterSubsystem.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bPauseWaveTime | bool | WaterSubsystem.h | ||
| bUnderWaterForAudio | bool | WaterSubsystem.h | ||
| bUsingOverrideWorldTimeSeconds | bool | WaterSubsystem.h | ||
| bUsingSmoothedTime | bool | WaterSubsystem.h | ||
| CachedDepthUnderwater | float | WaterSubsystem.h | ||
| FloodHeight | float | WaterSubsystem.h | ||
| MaterialParameterCollection | TObjectPtr< UMaterialParameterCollection > | The parameter collection asset that holds the global parameters that are updated by this actor | WaterSubsystem.h | |
| NonSmoothedWorldTimeSeconds | float | WaterSubsystem.h | ||
| OceanBodyComponent | TWeakObjectPtr< UWaterBodyComponent > | WaterSubsystem.h | ||
| OverrideWorldTimeSeconds | float | WaterSubsystem.h | ||
| PrevWorldTimeSeconds | float | WaterSubsystem.h | ||
| SmoothedWorldTimeSeconds | float | WaterSubsystem.h | ||
| UnderwaterPostProcessVolume | FUnderwaterPostProcessVolume | WaterSubsystem.h | ||
| UnderwaterTraceChannel | ECollisionChannel | WaterSubsystem.h | ||
| WaterBodyManager | FWaterBodyManager | WaterSubsystem.h | ||
| WaterTerrainActors | TMultiMap< const AActor *, TWeakObjectPtr< UWaterTerrainComponent > > | Keeps track of all actors that have WaterTerrainComponents so we can avoid extra work iterating every actors components to find one when global events are triggered. | WaterSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSoftObjectPtr< AWaterZone > FindWaterZone
(
const FBox2D& Bounds, |
WaterSubsystem.h | ||
ABuoyancyManager * GetBuoyancyManager() |
WaterSubsystem.h | ||
float GetCameraUnderwaterDepth() |
WaterSubsystem.h |
|
|
UMaterialParameterCollection * GetMaterialParameterCollection() |
WaterSubsystem.h | ||
float GetOceanBaseHeight() |
Returns the base height of the ocean. This should correspond to its world Z position | WaterSubsystem.h |
|
TWeakObjectPtr< UWaterBodyComponent > GetOceanBodyComponent() |
WaterSubsystem.h | ||
float GetOceanFloodHeight() |
Returns the relative flood height | WaterSubsystem.h |
|
float GetOceanTotalHeight () |
Returns the total height of the ocean. | WaterSubsystem.h |
|
float GetOverrideSmoothedWorldTimeSeconds() |
WaterSubsystem.h | ||
bool GetShouldOverrideSmoothedWorldTimeSeconds() |
WaterSubsystem.h | ||
float GetSmoothedWorldTimeSeconds() |
WaterSubsystem.h |
|
|
void GetWaterTerrainComponents
(
TArray< UWaterTerrainComponent* >& OutWaterTerrainComponents |
Returns a list of all water terrain components registered to the water subsystem. | WaterSubsystem.h | |
float GetWaterTimeSeconds() |
WaterSubsystem.h |
|
|
bool IsShallowWaterSimulationEnabled() |
WaterSubsystem.h |
|
|
bool IsUnderwaterPostProcessEnabled() |
WaterSubsystem.h |
|
|
bool IsWaterRenderingEnabled() |
WaterSubsystem.h |
|
|
void MarkAllWaterZonesForRebuild
(
EWaterZoneRebuildFlags RebuildFlags, |
WaterSubsystem.h | ||
void MarkWaterZonesInRegionForRebuild
(
const FBox2D& InUpdateRegion, |
WaterSubsystem.h | ||
void OnActorMoved
(
AActor* MovedActor |
WaterSubsystem.h | ||
void PrintToWaterLog
(
const FString& Message, |
WaterSubsystem.h |
|
|
void RegisterWaterTerrainComponent
(
UWaterTerrainComponent* WaterTerrainComponent |
WaterSubsystem.h | ||
void SetOceanBodyComponent
(
TWeakObjectPtr< UWaterBodyComponent > InOceanBodyComponent |
WaterSubsystem.h | ||
void SetOceanFloodHeight
(
float InFloodHeight |
WaterSubsystem.h |
|
|
void SetOverrideSmoothedWorldTimeSeconds
(
float InTime |
WaterSubsystem.h | ||
void SetShouldOverrideSmoothedWorldTimeSeconds
(
bool bOverride |
WaterSubsystem.h | ||
void SetShouldPauseWaveTime
(
bool bInPauseWaveTime |
WaterSubsystem.h | ||
void SetSmoothedWorldTimeSeconds
(
float InTime |
WaterSubsystem.h | ||
void UnregisterWaterTerrainComponent
(
UWaterTerrainComponent* WaterTerrainComponent |
WaterSubsystem.h |
Overridden from UWorldSubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool DoesSupportWorldType
(
EWorldType::Type WorldType |
UWorldSubsystem implementation Begin. | WaterSubsystem.h | |
virtual void PostInitialize() |
WaterSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
WaterSubsystem.h | ||
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
USubsystem implementation Begin. | WaterSubsystem.h |
Overridden from FTickableGameObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsTickableInEditor() |
WaterSubsystem.h |
Overridden from FTickableObjectBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TStatId GetStatId() |
WaterSubsystem.h | ||
virtual bool IsTickable() |
FTickableGameObject implementation Begin. | WaterSubsystem.h | |
virtual void Tick
(
float DeltaTime |
WaterSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSoftObjectPtr< AWaterZone > FindWaterZone
(
const UWorld* World, |
Returns the water with the highest priority within the bounds provided. | WaterSubsystem.h | |
static bool GetAllowWaterSubsystemOnPreviewWorld() |
WaterSubsystem.h | ||
static int32 GetShallowWaterMaxDynamicForces() |
WaterSubsystem.h |
|
|
static int32 GetShallowWaterMaxImpulseForces() |
WaterSubsystem.h |
|
|
static int32 GetShallowWaterSimulationRenderTargetSize() |
WaterSubsystem.h |
|
|
static FWaterBodyManager * GetWaterBodyManager
(
const UWorld* InWorld |
Static helper function to get a waterbody manager from a world, returns nullptr if world or manager don't exist | WaterSubsystem.h | |
static UWaterSubsystem * GetWaterSubsystem
(
const UWorld* InWorld |
Static helper function to get a water subsystem from a world, returns nullptr if world or subsystem don't exist | WaterSubsystem.h | |
static FWaterViewExtension * GetWaterViewExtension
(
const UWorld* InWorld |
Static helper function to get a weak ptr to the water scene view extension for a given world. | WaterSubsystem.h | |
static TWeakPtr< FWaterViewExtension, ESPMode::ThreadSafe > GetWaterViewExtensionWeakPtr
(
const UWorld* InWorld |
Static helper function to get a TWeakPtr to the water scene view extension for a given world. | WaterSubsystem.h | |
static void SetAllowWaterSubsystemOnPreviewWorld
(
bool bInValue |
WaterSubsystem.h |