/Engine/Plugins/Runtime/XRBase/Source/XRBase/Public/StereoLayerManager.h
Thread safety: Updates and the two protected access methods use a critical section to ensure atomic access to the layer structures. Therefore, it is probably better to copy layers before performing time consuming operations using CopyLayers and reserve ForEachLayer for simple processing or operations where you need to know the user-facing layer id. The WithLayer method is useful if you already know the id of a layer you need to access in a thread safe manner.
template<typename LayerType> class TStereoLayerManager : public [IStereoLayers](API\Runtime\Engine\IStereoLayers)