mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 09:35:25 +00:00
Fix crash bug when pushing different menu classes to the same stack
This could result in the weird crash bug "Objects have the same fully qualified name but different paths". It's important that the base name is unique to the class being pushed on to the stack, not sure why
This commit is contained in:
parent
b56d5fa42c
commit
a5025e51fc
@ -181,7 +181,7 @@ void UMenuStack::InputModeChanged(int PlayerIndex, EInputMode NewMode)
|
||||
|
||||
UMenuBase* UMenuStack::PushMenuByClass(TSubclassOf<UMenuBase> MenuClass)
|
||||
{
|
||||
const FName Name = MakeUniqueObjectName(this->GetOuter(), MenuClass, FName("Menu"));
|
||||
const FName Name = MakeUniqueObjectName(this->GetOuter(), MenuClass, MenuClass->GetFName());
|
||||
TSubclassOf<UUserWidget> BaseClass = MenuClass;
|
||||
const auto NewMenu = Cast<UMenuBase>(CreateWidgetInstance(*this, BaseClass, Name));
|
||||
PushMenuByObject(NewMenu);
|
||||
|
Loading…
x
Reference in New Issue
Block a user