From 3549f89bd28ea325c2eeed1bf33a74da411fea5f Mon Sep 17 00:00:00 2001 From: Arnaud Jamin Date: Wed, 12 Feb 2025 15:03:25 -0500 Subject: [PATCH 1/2] Update README.md --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 3e9e9bd..c8d17f3 100644 --- a/README.md +++ b/README.md @@ -447,6 +447,26 @@ public class CogSample : ModuleRules } ``` +- Override the Unreal GameInstance: +```cpp +#pragma once + +#include "CogSampleGameInstance.generated.h" + +class UCogSubsystem; + +UCLASS() +class UCogSampleGameInstance : public UGameInstance +{ + GENERATED_BODY() + + void Init() override; +}; +``` + +- Set your own game instance in the Unreal project settings: + +![GameInstance](https://github.com/user-attachments/assets/070f98a2-6312-4110-9395-830bc01df369) - In your GameInstance Init: - Add the windows you want to the CogSubsystem. In the sample we add all the built-in windows by calling Cog::AddAllWindows and we also add a custom window from the sample itself, showcasing that you can add your own windows. From e7c864b9621426884430420deb21f263dd1d38d7 Mon Sep 17 00:00:00 2001 From: Arnaud Jamin Date: Wed, 12 Feb 2025 15:04:34 -0500 Subject: [PATCH 2/2] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index c8d17f3..4512a7b 100644 --- a/README.md +++ b/README.md @@ -453,8 +453,6 @@ public class CogSample : ModuleRules #include "CogSampleGameInstance.generated.h" -class UCogSubsystem; - UCLASS() class UCogSampleGameInstance : public UGameInstance {