Thank you for explaining. I did do a fresh project from scratch the first time, second time I used their git and upgraded, and now I am on a third go around where the menu isnt displaying in 5.1. I think I have narrowed it down to the finders. When I try to play using stand alone i get the below error and my .cpp file follows. For my third time around I just went straight to on screen messages to save some time. I rebuilt, I deleted binaries and rebuilt and I also tried a rebuild from visual studio code. When ever I comment out all the stuff relevant to the helpers the standalone works. The weird part is when I play in editor the on screen message from the class finder works. So something very strange is going on and I can’t put my finger on it. I will try using the super init, but that shouldnt matter as all i am doing is displaying a couple of messages.
LoginId:04765cc04c8ca6fc94c4dca7d49013d3
EpicAccountId:a376e71e899e4dd99c4afae95548ae12
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000eb8
UnrealEditor_Engine
UnrealEditor_GDTV_PuzzlePlatforms_0001!UPuzzlePlatformGameInstance::UPuzzlePlatformGameInstance() [D:\Game Dev\Projects\GDTV_PuzzlePlatforms\Source\GDTV_PuzzlePlatforms\PuzzlePlatformGameInstance.cpp:13]
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Projects
UnrealEditor_Projects
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll
// Fill out your copyright notice in the Description page of Project Settings.
#include “PuzzlePlatformGameInstance.h”
#include “Engine/Engine.h”
#include “UObject/ConstructorHelpers.h”
#include “Blueprint/UserWidget.h”
#include “PlatformTrigger.h”
UPuzzlePlatformGameInstance::UPuzzlePlatformGameInstance(const FObjectInitializer &ObjectInitializer)
{
GEngine->AddOnScreenDebugMessage(-1,3,FColor::Emerald,FString(TEXT("This is from the base constructor")));
ConstructorHelpers::FClassFinder<UUserWidget> MenuBPClass(TEXT("/Game/MenuSystem/WBP_MainMenu"));
MenuClass = MenuBPClass.Class;
}
void UPuzzlePlatformGameInstance::Init()
{
GEngine->AddOnScreenDebugMessage(-1,3,FColor::Emerald,FString(TEXT("This is from the init constructor")));
GEngine->AddOnScreenDebugMessage(-1,3,FColor::Magenta, FString::Printf(TEXT("Found class %s"), *MenuClass->GetName()));
}
void UPuzzlePlatformGameInstance::LoadMenu()
{
UUserWidget* Menu = CreateWidget<UUserWidget>(this, MenuClass);
Menu->AddToViewport();
}
void UPuzzlePlatformGameInstance::Host()
{
GEngine->AddOnScreenDebugMessage(-1,3,FColor::Magenta,FString(TEXT("Hosting Server")));
UWorld* World = GetWorld();
World->ServerTravel("/Game/ThirdPerson/Maps/ThirdPersonMap?listen");
}
void UPuzzlePlatformGameInstance::Join(const FString& Address)
{
GEngine->AddOnScreenDebugMessage(-1,3,FColor::Magenta, FString::Printf(TEXT("Joining server%s"), *Address));
APlayerController* PlayerController = GetFirstLocalPlayerController();
PlayerController->ClientTravel(*Address,ETravelType::TRAVEL_Absolute);
}