// Fill out your copyright notice in the Description page of Project Settings. #include "MyActor.h" void AMyActor::SetViewportSize() { GEngine->GameViewport->SplitscreenInfo[0].PlayerData[0].OriginX = .05f; // default: 0.f GEngine->GameViewport->SplitscreenInfo[0].PlayerData[0].OriginY = .02f; // default: 0.f GEngine->GameViewport->SplitscreenInfo[0].PlayerData[0].SizeX = .4f; // default 1.f GEngine->GameViewport->SplitscreenInfo[0].PlayerData[0].SizeY = .2f; // default 1.f } // Sets default values AMyActor::AMyActor() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; } // Called when the game starts or when spawned void AMyActor::BeginPlay() { Super::BeginPlay(); SetViewportSize(); } // Called every frame void AMyActor::Tick(float DeltaTime) { Super::Tick(DeltaTime); }