What’s the problem? This is really weird. I tried to use both UObject and None Class.
I’ve been dealing with this problem for a week.
class XXX_API UGameManager : public UGameInstance
{
TUniquePtr<LevelManager> level_manager;
...
Init(){
level_manager = TUniquePtr<LevelManager>(new LevelManager());
}
....
}
class LevelManager
{
....
}
//Ticks per second
if (level_manager.Get() == nullptr)
{
UE_LOG(LogTemp, Warning, L"null")
}
else
{
UE_LOG(LogTemp, Warning, L"not null")
}
**When I focus on the New Editor Window or move it, this is the result:
**