Hello there,
I’m trying to destroy/create different touch interface in C++ during the game. Basically what I’m doing is:
In header, expose class variable. For some reason if I use TSubclassOf I cannot get the Touch Interface Setup created in content.
UPROPERTY(EditDefaultsOnly, Category = "Misc")
UTouchInterface* InGameTouchInterfaceClass;
In CPP:
m_gameTouchInterface = NewObject<UTouchInterface>(InGameTouchInterfaceClass);
if (m_gameTouchInterface) {
Log("Create touch interface!");
m_playerCtrller->ActivateTouchInterface(m_gameTouchInterface);
}
The code logs “Create touch interface” and no error reported. But the interface didn’t show up. Please help ;D