Skip to content

Latest commit

 

History

History
117 lines (75 loc) · 5.63 KB

CONTRIBUTING.md

File metadata and controls

117 lines (75 loc) · 5.63 KB

Contributing to the ConfigCat SDK for Unreal Engine

ConfigCat SDK is an open source project. Feedback and contribution are welcome. Contributions are made to this repo via Issues and Pull Requests.

Submitting bug reports and feature requests

The ConfigCat SDK team monitors the issue tracker in the SDK repository. Bug reports and feature requests specific to this SDK should be filed in this issue tracker. The team will respond to all newly filed issues.

Submitting pull requests

We encourage pull requests and other contributions from the community.

  • Before submitting pull requests, ensure that all temporary or unintended code is removed.
  • Be accompanied by a complete Pull Request template (loaded automatically when a PR is created).

When you submit a pull request or otherwise seek to include your change in the repository, you waive all your intellectual property rights, including your copyright and patent claims for the submission. For more details please read the contribution agreement.

In general, we follow the "fork-and-pull" Git workflow

  1. Fork the repository to your own Github account
  2. Clone the project to your machine
  3. Create a branch locally with a succinct but descriptive name
  4. Commit changes to the branch
  5. Following any formatting and testing guidelines specific to this repo
  6. Push changes to your fork
  7. Open a PR in our repository and follow the PR template so that we can efficiently review the changes.

Build instructions

This SDK is a wrapper around the CPP-SDK to expose the functionality inside Unreal Engine Blueprints & C++.

Prerequisites

To contribute the ConfigCat SDK for Unreal Engine, you will need to have:

  1. Install Unreal Engine either via official release or a source built
  2. Install the C++ Prequistes required for Unreal Engine
  3. Create a C++ based project

Optionally: complete the platform specific set-up,e.g.: iOS, Android, Linux or other platform you might target.

Install the plugin

To install you have to complete the following steps:

  1. Create a Plugins folder inside your root folder
  2. Clone the repository inside your Plugins folder using: git clone https://github.com/configcat/unreal-engine-sdk
  3. Start the Unreal Editor
  4. Enable the ConfigCat plugin using the Enabling a plugin steps
  5. Regenerate your project files and recompile your project

Using the Plugin

The plugin functionality can be accessed inside Unreal Engine by leveraging the UConfigCatSubsystem.

Either via C++:

const FString MyValue = UConfigCatSubsystem::Get()->GetStringValue(TEXT("MyKey"), TEXT(""), {});
UE_LOG(LogTemp, Warning, TEXT("%s"), *MyValue);

Or via Blueprints:

image

Advanced usage

Building a custom CPP-SDK

If you need to change or test core functionality of the SDK, you might need to rebuild the .lib or .a loaded by the plugin.

The easiest way to achieve this is to use vcpkg with the --editable flag.

Setup

  • On Windows:

    git clone https://github.com/microsoft/vcpkg
    .\vcpkg\bootstrap-vcpkg.bat
  • On Linux/Mac:

    git clone https://github.com/microsoft/vcpkg
    ./vcpkg/bootstrap-vcpkg.sh

Optionally you can use one of the Dockerfiles inside build-environments to get all the prequistes for certain platform pre-installed.

Installing

Depending on your target platform, you might want to use a specific triplet. If you are unusure what triplet you need to use, you can check the build CPP-SDK action and copy the --triplet XXX part.

for instance to build the .a for android, you will need to run:

./vcpkg/vcpkg install configcat --editable --triplet arm64-android

Modifying the source

After installing you can navigate to the ConfigCat source: /vcpkg/buildtrees/configcat/src/vX.Y.Z-COMMIT/ (e.g.: /vcpkg/buildtrees/configcat/src/v3.0.0-da9db9971a) and modify the source as you need.

Rebuilding

To force vcpkg to rebuild your changes run:

./vcpkg/vcpkg install remove configcat --triplet arm64-android
./vcpkg/vcpkg install configcat --editable --triplet arm64-android

NOTE: replace arm64-android with your triplet as needed.

Updating the lib

After rebuilding you will need to copy the resuling .lib or .a files built by vcpkg into the plugin.

You can find the new binaries inside:

  • On Windows: /vcpkg/installed/arm64-android/lib/
  • On Linux/Mac: /vcpkg/installed/arm64-android/configcat/lib