Files
UnrealEngineUWP/Engine/Source/Programs/NetworkPredictionTests/Private/NetPredictionMockPackageMap.cpp
Ryan Gerleve 05fe661f71 Added NetworkPrediction plugin unit tests and utilities covering basic simulation ticking in forward prediction and interpolation modes.
Added some APIs to the plugin to support unit testing without needing a UWorld, actors, etc.

#jira UE-182327
#rb mattias.hornlund
#preflight 642da9944d26bcd1eb1200b9

[CL 24931730 by Ryan Gerleve in ue5-main branch]
2023-04-05 13:25:07 -04:00

62 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Misc/AssertionMacros.h"
#include "NetPredictionMockPackageMap.h"
UNetPredictionMockPackageMap* UNetPredictionMockPackageMap::Get()
{
static UNetPredictionMockPackageMap* Instance = nullptr;
if (Instance == nullptr)
{
Instance = NewObject<UNetPredictionMockPackageMap>();
}
return Instance;
}
bool UNetPredictionMockPackageMap::WriteObject(FArchive & Ar, UObject* InOuter, FNetworkGUID NetGUID, FString ObjName)
{
ensureAlwaysMsgf(false, TEXT("Not supported"));
return false;
}
bool UNetPredictionMockPackageMap::SerializeObject(FArchive& Ar, UClass* InClass, UObject*& Obj, FNetworkGUID *OutNetGUID)
{
ensureAlwaysMsgf(false, TEXT("Not supported"));
return false;
}
bool UNetPredictionMockPackageMap::SerializeName(FArchive& Ar, FName& InName)
{
ensureAlwaysMsgf(false, TEXT("Not supported"));
return false;
}
UObject* UNetPredictionMockPackageMap::ResolvePathAndAssignNetGUID(const FNetworkGUID& NetGUID, const FString& PathName)
{
ensureAlwaysMsgf(false, TEXT("Not supported"));
return nullptr;
}
bool UNetPredictionMockPackageMap::SerializeNewActor(FArchive & Ar, class UActorChannel * Channel, class AActor *& Actor)
{
ensureAlwaysMsgf(false, TEXT("Not supported"));
return false;
}
UObject* UNetPredictionMockPackageMap::GetObjectFromNetGUID(const FNetworkGUID& NetGUID, const bool bIgnoreMustBeMapped )
{
ensureAlwaysMsgf(false, TEXT("Not supported"));
return nullptr;
}
FNetworkGUID UNetPredictionMockPackageMap::GetNetGUIDFromObject(const UObject* InObject) const
{
ensureAlwaysMsgf(false, TEXT("Not supported"));
return FNetworkGUID();
}
void UNetPredictionMockPackageMap::Serialize(FArchive& Ar)
{
ensureAlwaysMsgf(false, TEXT("Not supported"));
}