# 1. Configuration and Installation

## 1. Configuration requirements

* Unity version ≥ 2019.x.x
* Language version ≥ C# 6.0

## 2. Installation Instructions

<mark style="color:red;">We recommend upgrading to FalconCore and Falcon Analytic 3.0.0 as version 2.x.x has been deprecated and will be removed on April 15, 2024 (games that have not yet been updated will only have no analytics data on data4game, other features run normally).</mark>

1. <mark style="color:red;">To install SDK version 3.x.x, if you're installing SDK versions 2.x.x or older, you'll need to uninstall the entire old SDK and reinstall the new one to ensure no later exceptions occur. To facilitate reinstallation, please follow these steps:</mark>
   * Uninstall the old SDK by deleting the entire code in the Falcon folder
   * Download and import FalconCore via the link in step 2
   * If you are installing Analytic, download and install the FalconAnalytic package via the link: <https://bitbucket.org/falcongame/falcon-unity-sdk/raw/e82ae7844f6434a2756118695187d07734a091b6/Assets/Falcon/Release/FalconAnalytics/FalconAnalytics-3.2.0.unitypackage>
   * Fix all errors in the code (probably due to the fact that the old SDK had deprecated functions, which have been removed). At this point, the Unity Editor will reload and the reinstallation will be successful.
2. Download the latest FalconCore unitypackage at our bitbucket link: <https://bitbucket.org/falcongame/falcon-unity-sdk/raw/e82ae7844f6434a2756118695187d07734a091b6/Assets/Falcon/Release/FalconCore/FalconCore-3.2.0.unitypackage>
3. Import the FalconCore package into the unity project, and move the package to the desired directory.

<figure><img src="https://content.gitbook.com/content/jXDVMhWRiIUCExjfRIcD/blobs/VshhHt8X0bce9K4qLqQh/image.png" alt=""><figcaption><p>Import package FalconCore</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/jXDVMhWRiIUCExjfRIcD/blobs/CALsCWuhK8rshSbnAxRm/image.png" alt=""><figcaption><p>Move the package to the desired directory</p></figcaption></figure>

Note: *The Core package does not include the JsonDotNet package. If you wish to download it, please do so* [*here*](https://bitbucket.org/falcongame/falcon-unity-sdk/raw/9301036a38470b76ce84ef702e476cc6ff2c91bc/Assets/Falcon/Release/FalconCore/JsonDotNet201.unitypackage)*. The package is located at FalconCore/ThirdParty/JsonDotNet.*

<figure><img src="https://1219926239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXDVMhWRiIUCExjfRIcD%2Fuploads%2Ffnn22iUaiRnIHga9zlco%2Fimage.png?alt=media&#x26;token=8fadf6ba-66b9-43fa-a94f-ae0dfd93cd75" alt=""><figcaption><p>Import JsonDotNet</p></figcaption></figure>

3. Contact us through [data4game.com](http://data4game.com/) to receive fKey, the guide doc is providedat [Hướng dẫn lấy FalconKey(FKey)](https://falcon-game-studio.gitbook.io/falcon-sdk/general-guide/how-to-get-fkey)
4. Type fKey into the Falcon/FalconMenu on the toolbar.

<div data-full-width="false"><figure><img src="https://content.gitbook.com/content/jXDVMhWRiIUCExjfRIcD/blobs/ZPce6QftpTsNNoK6KjHt/image.png" alt=""><figcaption></figcaption></figure></div>

<figure><img src="https://content.gitbook.com/content/jXDVMhWRiIUCExjfRIcD/blobs/ZpwMgbA1UtT6VeiwS3cK/image.png" alt=""><figcaption><p>Type  fKey</p></figcaption></figure>

5. Click Login (fKey will be saved and login will be done automatically next time, you only have to enter fKey to log in again when updating FalconCore).
6. After Login is complete, the Menu will display a list of APIs.

<figure><img src="https://content.gitbook.com/content/jXDVMhWRiIUCExjfRIcD/blobs/nF0JKJpsTG8KZOucGGkG/image.png" alt=""><figcaption><p>The menu will display a list of APIs</p></figcaption></figure>

7. Click Install to install the desired API (we recommend downloading and using only official APIs with detailed documentation). Click the small red button next to it to uninstall the API. After updating to a new version, the old version of some dependent Plugins may be no longer compatible. It will be necessary to update the new version of those Plugins again.
8. More detailed installation instructions (if any) will be described on each API's page.

**Notes**: Some common errors and how to fix them can be found at [III.](https://falcon-game-studio.gitbook.io/falcon-sdk/falcon-analytics/5.qna)[QnA](https://falcon-game-studio.gitbook.io/falcon-sdk/falcon-analytics/5.qna)

## 3. Debug Log On/Off

The SDK's log is turned off by default to avoid logging unnecessary information, affecting the game development process. Only some error logs are displayed to warn users (no exceptions are thrown) when detecting logical conflicts.

To show the debug log of SDK, please perform the following steps:

* FalconCore : <mark style="color:orange;">#ecbd77</mark> - orange
* FalconAnalytics : <mark style="color:blue;">#35adcf</mark> - blue

To perform debugging with SDk logs on the app, please perform the following steps:

1. Access File -> Build Settings...

<figure><img src="https://content.gitbook.com/content/jXDVMhWRiIUCExjfRIcD/blobs/A9nWI5sNEhBAzMhiWRKc/image.png" alt=""><figcaption></figcaption></figure>

2. Click Player Settings...

<figure><img src="https://content.gitbook.com/content/jXDVMhWRiIUCExjfRIcD/blobs/Aby0COY2PfzvHqAxIOzH/image.png" alt=""><figcaption></figcaption></figure>

3. Select the corresponding platform, then find Other Settings -> Scripting Define Symbols and add FALCON\_LOG\_DEBUG.

<figure><img src="https://content.gitbook.com/content/jXDVMhWRiIUCExjfRIcD/blobs/NaPu0otequVDP3e3ihZD/image.png" alt=""><figcaption></figcaption></figure>
