Update README.md

This commit is contained in:
Arnaud Jamin
2025-03-19 13:01:20 -04:00
committed by GitHub
parent 810c51ac13
commit 1676f58848
-23
View File
@@ -502,29 +502,6 @@ void UCogSampleGameInstance::Init()
}
```
- In your PlayerController class, spawn the Cog Replicators. The Replicator are used to communicate between the client and the server, for example to apply cheats, spawn actors, etc.
```cpp
#if ENABLE_COG
#include "CogAbilityReplicator.h"
#include "CogDebugDraw.h"
#include "CogDebugReplicator.h"
#include "CogEngineReplicator.h"
#endif //ENABLE_COG
void ACogSamplePlayerController::BeginPlay()
{
Super::BeginPlay();
#if ENABLE_COG
// Spawn the Replicator of each plugin
ACogDebugReplicator::Spawn(this);
ACogAbilityReplicator::Spawn(this);
ACogEngineReplicator::Spawn(this);
#endif //ENABLE_COG
}
```
- Implement Cog Interfaces on your desired actor classes:
```cpp
// CogSampleCharacter.h