Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

unreal sdk news #467

Merged
merged 9 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions website/docs/news.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ Here, you'll find all the latest updates, enhancements, and new features we've a

{/* This page must be in sync with the news page on the Dashboard: https://github.com/configcat/app/blob/master/src/app/home-module/news/news.component.html */}

## New ConfigCat SDK for Unreal Engine

#### Jul 31, 2024

We just released a new official ConfigCat SDK supporting Unreal Engine applications.

<img src="/docs/assets/news/unreal.jpg" width="400" />

[See Documentation](./sdk-reference/unreal.mdx)

## New ConfigCat SDK for Rust

#### Jul 19, 2024
Expand Down
5 changes: 5 additions & 0 deletions website/docs/sdk-reference/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,8 @@ Check out our language specific<a href="https://app.configcat.com/sdkkey" target

- [Documentation](./ios.mdx) on how to connect your application.
- <a href="https://github.com/configcat/swift-sdk" target="_blank">GitHub repository of the ConfigCat Swift SDK.</a>

## Unreal Engine

- [Documentation](./unreal.mdx) on how to connect your application.
- <a href="https://github.com/configcat/unreal-engine-sdk" target="_blank">GitHub repository of the ConfigCat Unreal Engine SDK.</a>
61 changes: 30 additions & 31 deletions website/docs/sdk-reference/unreal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ export const CPPSchema = require('@site/src/schema-markup/sdk-reference/cpp.json

Via **[Unreal Marketplace](https://www.unrealengine.com/marketplace/product/e142293a397d4ce4bf6a1f3053a2316d)**

Via **[GitHub clone](https://github.com/configcat/unreal-engine-sdk)**
Via **[GitHub](https://github.com/configcat/unreal-engine-sdk)**

Prequesities to cloning manually:
Prequesities to building manually:
- you are working in a [C++ project](https://docs.unrealengine.com/5.2/en-US/compiling-game-projects-in-unreal-engine-using-cplusplus/)
- you've completed the [Visual Studio](https://docs.unrealengine.com/5.2/en-US/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine/) or [Visual Studio Code](https://docs.unrealengine.com/5.2/en-US/setting-up-visual-studio-code-for-unreal-engine/) setup

Run the following commands in the root folder of your project (where the `.uproject` file is located):
To download:

```cmd
mkdir -p Plugins
cd Plugins
git clone https://github.com/configcat/unreal-engine-sdk ConfigCat
```
- Create a `Plugins` folder in the root folder of your project (where the `.uproject` file is located).
- Head to the download the latest [ConfigCat.zip](https://github.com/configcat/unreal-engine-sdk/releases/latest/download/ConfigCat.zip) archive or any of the previous versions from: [Releases](https://github.com/configcat/unreal-engine-sdk/releases)
- Unzip the content inside the `Plugins` folder.

Note: if you are using a locally built plugin, you will need to rebuild from source manually.

### 2. Enable the ConfigCat plugin in your project

Expand All @@ -46,8 +46,6 @@ Navigate to `Edit -> Plugins` and perform the following steps:
1. Find the `Config Cat` plugin and **tick** the enable checkbox.
1. Press `Restart` to load up the editor.

Note: if you are using a locally built plugin, you will need to rebuild from source manually.

### 3. Set up the _ConfigCat_ settings with your _SDK Key_

You can configure all ConfigCat related settings inside the `ProjectSettings -> Feature Flags -> ConfigCat`.
Expand Down Expand Up @@ -79,7 +77,7 @@ You can configure all ConfigCat related settings inside the `ProjectSettings ->
</TabItem>
<TabItem value="cpp" label="C++">

Add Depedency to your `.Build.cs` file:
Add the ConfigCat Dependency to your `.Build.cs` file:

```cpp
PrivateDependencyModuleNames.AddRange(new string[]
Expand All @@ -90,6 +88,8 @@ PrivateDependencyModuleNames.AddRange(new string[]

Access feature flags:
```cpp
#include "ConfigCatSubsystem.h"

UConfigCatSubsystem* ConfigCat = UConfigCatSubsystem::Get(this);
bool bIsMyAwesomeFeatureEnabled = ConfigCat->GetBoolValue(TEXT("isMyAwesomeFeatureEnabled"), false);
SetMyAwesomeFeatureEnabled(bIsMyAwesomeFeatureEnabled);
Expand Down Expand Up @@ -129,7 +129,7 @@ Access value depending on type targeting an user:
```cpp
UConfigCatSubsystem* ConfigCat = UConfigCatSubsystem::Get(this);

FConfigCatUser User = FConfigCatUser(TEXT("#USER-IDENTIFIER#"));
auto User = UConfigCatUserWrapper::CreateUser(TEXT("#USER-IDENTIFIER#"));
FString TargetValue = ConfigCat->GetStringValue(TEXT("targetValue"), TEXT(""), User);
```

Expand Down Expand Up @@ -157,9 +157,8 @@ FString TargetValue = ConfigCat->GetStringValue(TEXT("targetValue"), TEXT(""), U
```cpp
UConfigCatSubsystem* ConfigCat = UConfigCatSubsystem::Get(this);

FConfigCatUser User = FConfigCatUser(TEXT("#USER-IDENTIFIER#"));
FConfigCatEvaluationDetails Details = ConfigCat->GetStringValueDetails(TEXT("myFeatureFlag"),
TEXT(""), User);
auto User = UConfigCatUserWrapper::CreateUser(TEXT("#USER-IDENTIFIER#"));
auto Details = ConfigCat->GetStringValueDetails(TEXT("myFeatureFlag"), TEXT(""), User);
```

</TabItem>
Expand Down Expand Up @@ -191,7 +190,7 @@ The [User Object](../targeting/user-object.mdx) is essential if you'd like to us
<TabItem value="cpp" label="C++">

```cpp
FConfigCatUser User = FConfigCatUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
auto User = UConfigCatUserWrapper::CreateUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
```

</TabItem>
Expand All @@ -218,7 +217,7 @@ FConfigCatUser User = FConfigCatUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
TMap<FString, FString> Attributes;
Attributes.Emplace(TEXT("SubscriptionType"), TEXT("Pro"));
Attributes.Emplace(TEXT("UserRole"), TEXT("Admin"));
FConfigCatUser User = FConfigCatUser(TEXT("#UNIQUE-USER-IDENTIFIER#"), TEXT("john@example.com"),
auto User = UConfigCatUserWrapper::CreateUser(TEXT("#UNIQUE-USER-IDENTIFIER#"), TEXT("john@example.com"),
TEXT("United Kingdom"), Attributes);
```

Expand All @@ -241,7 +240,7 @@ You can set the default User Object with the `setDefaultUser()` method of the Co

```cpp
UConfigCatSubsystem* ConfigCat = UConfigCatSubsystem::Get(this);
FConfigCatUser User = FConfigCatUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
auto User = UConfigCatUserWrapper::CreateUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
ConfigCat->SetDefaultUser(User);
```

Expand All @@ -260,7 +259,7 @@ Whenever the `GetValue()`, `GetValueDetails()`, `GetAllValues()`, or `GetAllValu

```cpp
UConfigCatSubsystem* ConfigCat = UConfigCatSubsystem::Get(this);
FConfigCatUser User = FConfigCatUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
auto User = UConfigCatUserWrapper::CreateUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
ConfigCat->SetDefaultUser(User);

// The default user will be used at the evaluation process.
Expand All @@ -282,10 +281,10 @@ When the `user` parameter is specified on the requesting method, it takes preced

```cpp
UConfigCatSubsystem* ConfigCat = UConfigCatSubsystem::Get(this);
FConfigCatUser User = FConfigCatUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
auto User = UConfigCatUserWrapper::CreateUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
ConfigCat->SetDefaultUser(User);

FConfigCatUser OtherUser = FConfigCatUser(TEXT("#OTHER-UNIQUE-USER-IDENTIFIER#"));
auto OtherUser = UConfigCatUserWrapper::CreateUser(TEXT("#OTHER-UNIQUE-USER-IDENTIFIER#"));

// OtherUser will be used at the evaluation process.
bool bMySetting = ConfigCat->GetBoolValue(TEXT("keyOfMySetting"), false, OtherUser);
Expand Down Expand Up @@ -391,11 +390,11 @@ You can subscribe to these events either on SDK initialization:

```cpp
UConfigCatSubsystem* ConfigCat = UConfigCatSubsystem::Get(this);

ConfigCat->OnClientReady.AddWeakLambda(this, [](){ /* OnClientReady callback */ });
ConfigCat->OnConfigChanged.AddWeakLambda(this, [](const FConfigCatConfig& Config){ /* OnConfigChanged callback */ });
ConfigCat->OnFlagEvaluated.AddWeakLambda(this, [](const FConfigCatEvaluationDetails& Details){ /* OnFlagEvaluated callback */ });
ConfigCat->OnError.AddWeakLambda(this, [](const FString& Error){ /* OnError callback */ });
ConfigCat->OnConfigChanged.AddWeakLambda(this, [](UConfigCatSettingsWrapper* Config){ /* OnConfigChanged callback */ });
ConfigCat->OnFlagEvaluated.AddWeakLambda(this, [](UConfigCatEvaluationWrapper* Details){ /* OnFlagEvaluated callback */ });
ConfigCat->OnError.AddWeakLambda(this, [](const FString& Error, const FString& Exception){ /* OnError callback */ });
```

</TabItem>
Expand Down Expand Up @@ -592,10 +591,10 @@ Evaluates and returns the values of all feature flags and settings. Passing a Us

```cpp
UConfigCatSubsystem* ConfigCat = UConfigCatSubsystem::Get(this);
TMap<FString, FConfigCatValue> SettingValues = ConfigCat->GetAllValues();
FConfigCatUser User = FConfigCatUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
TMap<FString, FConfigCatValue> SettingValuesTargeting = ConfigCat->GetAllValues(User);
TMap<FString, UConfigCatValueWrapper*> SettingValues = ConfigCat->GetAllValues();

auto User = UConfigCatUserWrapper::CreateUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
TMap<FString, UConfigCatValueWrapper*> SettingValuesTargeting = ConfigCat->GetAllValues(User);
```

</TabItem>
Expand All @@ -615,9 +614,9 @@ Evaluates and returns the detailed values of all feature flags and settings. Pas

```cpp
UConfigCatSubsystem* ConfigCat = UConfigCatSubsystem::Get(this);
FConfigCatUser User = FConfigCatUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));
auto User = UConfigCatUserWrapper::CreateUser(TEXT("#UNIQUE-USER-IDENTIFIER#"));

TArray<FConfigCatEvaluationDetails> AllValueDetails = ConfigCat->GetAllValueDetails(User);
TArray<UConfigCatEvaluationWrapper*> AllValueDetails = ConfigCat->GetAllValueDetails(User);
```

</TabItem>
Expand Down
1 change: 1 addition & 0 deletions website/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ const sidebars: SidebarsConfig = {
{ type: 'doc', id: 'sdk-reference/ruby', label: 'Ruby' },
{ type: 'doc', id: 'sdk-reference/rust', label: 'Rust' },
{ type: 'doc', id: 'sdk-reference/ios', label: 'Swift (iOS)' },
{ type: 'doc', id: 'sdk-reference/unreal', label: 'Unreal Engine' },
{
'Community Maintained': [
{
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const features = [
{ url: 'sdk-reference/ruby', title: 'Ruby' },
{ url: 'sdk-reference/rust', title: 'Rust' },
{ url: 'sdk-reference/ios', title: 'Swift (iOS)' },
{ url: 'sdk-reference/unreal', title: 'Unreal Engine' },
],
},
{
Expand Down
Binary file added website/static/assets/news/unreal.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/static/assets/unreal/blueprint-event-delegates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/static/assets/unreal/blueprints-create-user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/static/assets/unreal/blueprints-force-refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/static/assets/unreal/blueprints-get-all-keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/static/assets/unreal/blueprints-get-all-values.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/static/assets/unreal/blueprints-get-value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/static/assets/unreal/plugin-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/static/assets/unreal/settings-overrides.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions website/versioned_docs/version-V1/news.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ Here, you'll find all the latest updates, enhancements, and new features we've a

{/* This page must be in sync with the news page on the Dashboard: https://github.com/configcat/app/blob/master/src/app/home-module/news/news.component.html */}

## New ConfigCat SDK for Unreal Engine

#### Jul 31, 2024

We just released a new official ConfigCat SDK supporting Unreal Engine applications.

<img src="/docs/assets/news/unreal.jpg" width="400" />

[See Documentation](./sdk-reference/unreal.mdx)

## New ConfigCat SDK for Rust

#### Jul 19, 2024
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,8 @@ Check out our language specific<a href="https://app.configcat.com/sdkkey" target

- [Documentation](./ios.mdx) on how to connect your application.
- <a href="https://github.com/configcat/swift-sdk" target="_blank">GitHub repository of the ConfigCat Swift SDK.</a>

## Unreal Engine

- [Documentation](./unreal.mdx) on how to connect your application.
- <a href="https://github.com/configcat/unreal-engine-sdk" target="_blank">GitHub repository of the ConfigCat Unreal Engine SDK.</a>
Loading
Loading