Hello,
I’ve been searching for some time and seen quite a lot of topics about how to get UEnhancedInputLocalPlayerSubsystem, but they all seem to involve PlayerController in some way (or at least getting the current UWorld).
Now, I might be totally misunderstanding something, but this is what I’ve got and what I’m planning to do.
I am making a main menu where the player will be able to change key mappings. I’ve done this in BP first, but now I want to do it in C++.
In BP it was more or less straightforward: simply get Enhanced Input Local Player Subsystem and then do the remapping there - there was no need to reference any World or LocalPlayer.
In c++ however, in order to get UEnhancedInputLocalPlayerSubsystem, all the solutions that I’ve seen require a reference to the ULocalPlayer, which in turn requires referencing a UWorld.
Now, in C++ file (UMyGameUserSettings.h/cpp - derived from UGameUserSettings) I don’t have any reference to the LocalPlayer or any World - these are just user settings, which are supposed to work globally in any world, I really don’t get it. Even if I wanted to, how am I supposed to get UWorld or LocalPlayer in UserSettings?