question

ejr avatar image
ejr asked

Custom events not reported

I've got some custom events fired from my game, for example:player_finished_level_win when player finishes a level.


It works for one title (660E) and doesn't for another one (B984A). The code is exactly the same and only title id is different.
Both titles have the same settings.

What is wrong?

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image Seth Du ♦ commented ·

Which SDK are you using? have you changed the title settings like PlayFab.settings.titleId?

0 Likes 0 ·
ejr avatar image ejr Seth Du ♦ commented ·

Yes, title id is changed. I change PlayFabSettings.TitleId

To send event I use: PlayFabClientAPI.WritePlayerEvent

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ ejr commented ·

Any error report? what's the callback result?

It is a client API that needs a session ticket, make sure the player account that you have logged in belongs to the correct title.

0 Likes 0 ·

1 Answer

·
ejr avatar image
ejr answered

"The URL for this request is not valid for this title. The correct API endpoint is..."

I have set

PlayFabSettings.TitleId = [Title ID];

is it not enough? How to set the valid endpoint ?

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image Seth Du ♦ commented ·

If you are using Unity SDK, you also need to change the title settings in the PlayFab Unity Extension.

0 Likes 0 ·
ejr avatar image ejr Seth Du ♦ commented ·

I'd prefer to change all settings from the code on runtime. This is why I change

PlayFabSettings.TitleId but I'm not sure if this setting is enough?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ ejr commented ·

If you are using PlayFabSettings.TitleId, you should set the studio as _OVERRIDE_ in the PlayFab extension, so that the code will override the settings, otherwise the extension always has the higher priority.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.