UGameplayStatics::GetEnableWorldRendering
#include "Kismet/GameplayStatics.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Returns whether world rendering is currently enabled on the local viewport.
Caveats & Gotchas
- • Returns the viewport's stored flag, not a GPU state query — it is possible for the rendering system to be in a transitional state immediately after toggling.
- • On dedicated servers there is no viewport, so this always returns true (or is not meaningful).
Signature
static ENGINE_API bool GetEnableWorldRendering(const UObject* WorldContextObject); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| WorldContextObject | const UObject* | Object used to retrieve the world context. | — |
Return Type
bool Example
Only enable rendering when not already enabled C++
if (!UGameplayStatics::GetEnableWorldRendering(this))
{
UGameplayStatics::SetEnableWorldRendering(this, true);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?