IStereoLayers::PushLayerState

Saves the current stereo layer state on a stack to later restore them.

Windows
MacOS
Linux

Override Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/IStereoLayers.h

Include

#include "IStereoLayers.h"

Syntax

virtual void PushLayerState
(
    bool bPreserve
)

Remarks

Saves the current stereo layer state on a stack to later restore them.

Useful for creating temporary overlays that should be torn down later.

When bPreserve is false, existing layers will be temporarily disabled and restored again when calling PopLayerState() The disabled layer's properties are still accessible by calling Get and SetLayerDesc, but nothing will change until after the state has been restored. Calling DestroyLayer on an inactive layer, will prevent it from being restored when PopLayerState() is called.

When bPreserve is true, existing layers will remain active, but when calling PopLayerState(), any changed properties will be restored back to their previous values. Calling DestroyLayer on an active layer id will make the layer inactive. The layer will be reactivated when the state is restored. (You can call DestroyLayer multiple times on the same layer id to remove successively older versions of a layer.)

In either case, layers created after PushLayerState() will be destroyed upon calling PopLayerState().

Parameters

Parameter

Description

bPreserve

Whether the existing layers should be preserved after saving the state. If false all existing layers will be disabled.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss