I used RakNet as networking protocool at my project. I defined my peer on GameInstance but when I try to change map, peer connection is lost. I know GameInstance is not destroyed anytime. Could anyone help me?
maybe show some code of gameinstance
I connect with this peer …
UCLASS()
class MMOCLIENT_API UMyGameInstance : public UGameInstance
{
GENERATED_UCLASS_BODY()
RakNet::RakPeerInterface *peer = RakNet::RakPeerInterface::GetInstance();
}
Try to put the pointer in a ustruct, and contain a uproperty variable with the struct.
Same error, client is disconnected …