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.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback