MyBlueprintFunctionLibrary.cpp 707 B

123456789101112131415161718192021
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2. #include "MyBlueprintFunctionLibrary.h"
  3. void UMyBlueprintFunctionLibrary::AdjustViewportSize(float OriginX, float OriginY, float SizeX, float SizeY)
  4. {
  5. GEngine->GameViewport->SplitscreenInfo[0].PlayerData[0].OriginX = OriginX; // default: 0.f
  6. GEngine->GameViewport->SplitscreenInfo[0].PlayerData[0].OriginY = OriginY; // default: 0.f
  7. GEngine->GameViewport->SplitscreenInfo[0].PlayerData[0].SizeX = SizeX; // default 1.f
  8. GEngine->GameViewport->SplitscreenInfo[0].PlayerData[0].SizeY = SizeY; // default 1.f
  9. }
  10. FColor UMyBlueprintFunctionLibrary::HexToColor(FString HexString)
  11. {
  12. return FColor::FromHex(HexString);
  13. }