Hi,
Question from one of my engineers.
Subject:
Custom UConsole Subclass Doesn’t Persist HistoryBuffer—Manual Save/Load Required via ConsoleHistory.ini
Details:
Implemented `UP1Console` derived from `UConsole` using the following details:
UCLASS(Within=GameViewportClient, config=Input, MinimalAPI)
class UP1Console : public UConsole
1. Matching the UCLASS specifiers of UConsole (with and without the Transient)
2. DefaultEngine.ini
[/Script/Engine.Engine]
ConsoleClassName=/Script/P1Game.P1Console
3. DefaultEditor.ini
[/Script/UnrealEd.UnrealEdEngine]
ConsoleClassName=/Script/P1Game.P1Console
I created the class in order to register auto complete entries for custom cheat commands, so really the only function I overloaded was BuildRuntimeAutoCompleteList
What broke was the console command history between app sessions was lost (specifically in a PIE session). Ultimately to patch it I wrote brute force saves/loads. But I shouldn’t have to do that, so it feels like there is something crucial missing or perhaps it’s an engine bug.
Files attached, it’s generic code and nothing propriety.
Thanks,
Simon