In StereoLayerComponent.h, there is no method to set stereo layer type. No public function allows to set following variable:
/** Specifies how and where the quad is rendered to the screen **/
UPROPERTY(EditAnywhere, BlueprintReadOnly, export, Category=“StereoLayer”)
TEnumAsByte StereoLayerType;
Is it possible to set the StereoLayer type in C++ without editing the Engine code?
Other functions are implemented (e.g. set texture), but some as above are not.
Make a child class of UStereoLayerComponent and expose it there then use the new class in place of the StereoLayerComponent
.h
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/StereoLayerComponent.h"
#include "MyStereoLayerComponent.generated.h"
/**
*
*/
UCLASS(Blueprintable, BlueprintType)
class YOUR_API UMyStereoLayerComponent : public UStereoLayerComponent
{
GENERATED_BODY()
UFUNCTION(BlueprintCallable) // if bp is needed
void SetStereoLayerType(EStereoLayerType passedInStereoLayerType);
};
.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyStereoLayerComponent.h"
void UMyStereoLayerComponent::SetStereoLayerType(EStereoLayerType passedInStereoLayerType) {
StereoLayerType = passedInStereoLayerType;
}