Install plugin (for version 0.4.0 or higher)

1. Playfab

First of all you need to register on Playfab. https://developer.playfab.com/

Document image

Create new title on Playfab.

Document image

It's all about Playfab.



2. Import CBS Plugin.

First of all, install the Playfab Editor Extension. Download unitypackage https://aka.ms/playfabunityextension and import to Unity.

Document image

Open Playfab editor and login with Playfab account. WARNING. If the Playfab context menu does not appear - just restart Unity.

Document image
Document image

Install Playfab SDK.

Document image

Navigate to SETTING->PROJECT

Document image

Select the Studio and Title ID you created earlier

Document image

Select Request Type - Unity Web Request and don't Compress Api Data to make the solution as cross-platform as possible

Document image

Import CBS plugin from asset-store

Document image

Open CBS->Configurator

Document image

The first time a Missing Script Define warning appears. Click Yes.



Document image

Again navigate to Open CBS->Configurator and CBS editor window will appear if everything is install correctly.

Document image





3. Azure Storage Table

First of all register on https://portal.azure.com/

After login navigate to storage accounts

Document image

Click "Start" Fill in all the information provided and confirm it

Document image

After that navigate to storage account again

Document image

Create new storage account.

Document image

Enter Storage account name and select region and click Review+create

Document image

After success deployment - click "Go to resource"

Document image

Navigate to "Shared access signature"

Document image

Allow all resource types

Document image

Set expiry date 50 years ahead for example. And click "Generate SAS and connection string"

Document image

Go to Unity open CBS configurator and navigate to "Azure" tab

Document image



Copy SAS token

Document image

And paste into Azure SAS Token field. Click save.

Document image



Copy azure storage account name

Document image



And paste into Azure Storage field. Click save.

Document image



Click "Check" and you will receive a message about successful installation

Document image



4. Upload Azure functions.

Navigate to "Playfab" tab and click "Import Azure Functions Project".

Document image

You will receive a message about successful import.

Document image

At the root of the project, you should see the "CBSAzureFunctionsProject" folder. This is a vscode server-side source project.

Document image

To upload server-side code to Azure, we need the .NET 6 Framework and Visual Studio Code. First, let's install .NET 6. Download the .NET 6 installer and install it on your computer. https://dotnet.microsoft.com/download/dotnet/6.0

Document image



Next, install Visual Studio Code. You can download it here https://code.visualstudio.com/

Document image

Open VS Code and click "File - Open Folder"

Document image



Select the folder of the previously loaded project "CBSAzureFunctionsProject"

Document image

Now we need to install the Azure Functions extension for VS Code. Navigate to "Extensions" tab. Search "Azure Functions" extension and click "Install"

Document image

Navigate to Azure tab and sign in using login password



Document image

After successful login - click Terminal -> New Terminal

Document image

In a terminal window enter the command "dotnet restore -p: TargetFramework = net6.0 --force" and press Enter

Document image

Now let's upload the functions to Azure. In the "Azure" tab - click "Deploy To Function App"

Document image

Click "Create new Function App in Azure"

Document image

Enter a unique name for the app

Document image

Select .NET 6 stack

Document image

Choose a region suitable for you and wait until the end of creating the Function App

Document image

Finally you will get a message that the functions have uploaded successfully

Document image



5. Link Azure and Playfab

Return to the Azure Portal, go to the Events tab, select the Azure Function and click Create

Document image

Click on the function app and copy the function url

Document image



Go back to the Unity editor, go to the Azure tab and paste the copied URL into the "Azure Function URL" box. Click Save

Document image

Go back to the Azure Portal and click "Function app settings"

Document image



Copy master key

Document image

Go back to the Unity editor, go to the Azure tab and paste the copied master key into the "Azure Master Key" box. Click Save

Document image

Go to the Playfab portal. Go to the "API Features" tab. Copy "Title ID"

Document image



Go back to the Azure Portal and click "Configuration"

Document image

Click "New Application Setting"

Document image

Enter PLAYFAB_TITLE_ID in the Name field and the copied Title ID in the Value field. Click OK

Document image

Go to the Playfab portal. Go to the "Secret Keys" tab. Copy your "Secret key"

Document image

Return to Azure Portal. Again Click "New Application Setting"



Document image

Enter PLAYFAB_DEV_SECRET_KEY in the Name field and the copied Secret key in the Value field. Click OK

Document image

Finally click Save

Document image

Return to the Unity Editor, go to the "Playfab" tab and click "Register Azure Functions"

Document image

Finally, you will receive a message about the successful registration of functions on the Playfab.

Document image

Congratulations, you have successfully finished installing the plugin!



6. Run examples

Add examples scenes to "Build Settings"

Document image

Run Login scene

Document image



If you have any questions - please contact us - dev.simpleassets.unity@gmail.com Unity forum https://forum.unity.com/threads/released-cbs-cross-platform-backend-solution.1176128/ Discord server https://discord.gg/qUwPVPfxve