My DefaultEngine.ini had add the config like this:
- [/Script/Engine.GameEngine]
- +NetDriverDefinitions=(DefName=“DemoNetDriver”,DriverClassName="/Script/Engine.DemoNetDriver",DriverClassNameFallback="/Script/Engine.DemoNetDriver")
and i using the console command to replay system:
in .h:
UFUNCTION(EXEC)
void testReplay(int type);
in .cpp:
void AtestReplay01GameMode::testReplay(int type)
{
switch (type)
{
case 0: // record
GetGameInstance()->StartRecordingReplay(TEXT("testReplay"), TEXT(""));
break;
case 1: // stop record
GetGameInstance()->StopRecordingReplay();
break;
case 2: // play
GetGameInstance()->PlayReplay(TEXT("testReplay"));
break;
}
}
and character blueprint:
Replicate movement = true
Replicates = true
Mesh component:
Component Replicate = true;
I using bluepring to play anim montage:
E key----Switch has authority-----Authorty: custom event(Play Anim), and set to Replicates=Multicast, Reliable=true------PlayAnimMontage
Switch has authority-----Remote: custom event(Client Play Anim), and set to Replicates=Run on server, Reliable=true-----custom event(Play Anim)
the anim montage can play with multiplay, but can’t play in Replay system.
at last, i try to use 4.17.2 version, but same as 4.18.0