Skip to main content

Common FAQ

1. Common

1.1 Do I need to call CreatePGOS in both C++ code and blueprint?

You should call CreatePGOS API in the main thread before using any PGOS service.

  • If you need to use PGOS blueprint API, then you need to call CreatePGOS in the blueprint.

  • If you don’t need any PGOS blueprint API, then you don’t need to call CreatePGOS in the blueprint, just call it in C++ code.

  • If you have called CreatePGOS in the blueprint, you don't need to call CreatePGOS in C++ code. It doesn't matter if you also call CreatePGOS in C++ code, it will not have a bad effect.

2. Battle Service

2.1 Why does my matchmaking end with a timeout?

Possible reasons are as follows:

  1. A common reason is that the DS didn't call ActivateBattleSession after the PGOS event OnStartBattleSession arrived. If so, the status of the battle session is generally PENDING. Click here for more details.
  2. Another possible reason is: the associated fleet is out of resource. Go to DS & Builds > Fleets > Click the target fleet id > CVM Instances, check the number of Active DS Instances, make sure there is at least one idle DS Instance. Associated information:
    • Make sure ProcessEnding API is called when the battle session ends, which will end the current DS instance and launch a new idle DS instance.
    • By modifying Fleet's Launch Config on the Portal, you can adjust the maximum number of DS on one CVM.

2.2 Why does my StartBattle in the lobby doesn't work and get a timeout?

Possible reasons are as follows:

  1. A common reason is that the DS didn't call ActivateBattleSession after the PGOS event OnStartBattleSession arrived. If so, the status of the battle session is generally PENDING. Click here for more details.
  2. Another possible reason is: the associated fleet is out of resource. Go to DS & Builds > Fleets > Click the target fleet id > CVM Instances, check the number of Active DS Instances, make sure there is at least one idle DS Instance. Associated information:
    • Make sure ProcessEnding API is called when the battle session ends, which will end the current DS instance and launch a new idle DS instance.
    • By modifying Fleet's Launch Config on the Portal, you can adjust the maximum number of DS on one CVM.

3. DS Hosting

3.1 Why did the fleet I created fail?

There are many reasons for the failure of fleet creation, and you can check the fleet events to get more information(by clicking the fleet ID in the fleet list ). To make a fleet work, it is necessary for DS to build to integrate PgosSDK first, click here for more details.

3.2 Can I run a script before launching my DS?

You can add a script file to the root of your build package and it will run automatically before launching DS, click here for more details.

3.3 Can I use GameInstance instead of GameMode to communicate with PGOS On DS?

Using GameInstance instead of GameMode to handle PGOS callbacks is fine, PGOS has no restrictions on this.