1、GameInstance
1、首先加载GameInstance,全局唯一,切换Map也是唯一的,用于做一些全局操作,比如监听Map加载,监听App进入前台、退出后台
// Fill out your copyright notice in the Description page of Project Settings.#include "Core/Base/MyGameInstance.h"#include "Core/Config/GameConfig.h"
#include "Core/Util/TimeUtil.h"
#include "Global/GlobalManager.h"
#include "Kismet/KismetSystemLibrary.h"
#include "Misc/Base64.h"UMyGameInstance::UMyGameInstance(const FObjectInitializer& ObjectInitializer): Super(ObjectInitializer) {}void UMyGameInstance::Init() {Super::Init();
#if WITH_EDITORGAllowActorScriptExecutionInEditor = true;ResizeViewPort(1080, 1920);
#endifif (GameConfig::IS_PAK