question

agneskripkaite avatar image
agneskripkaite asked

How do I specify custom settings like TitleId for instanced API classes in C++ in Unreal Engine project?

Hello! I am trying to use the instanced API classes in our Unreal Engine project but I cannot figure out how to pass custom settings to these instanced classes in C++. The documentation tells me to use PlayFabApiSettings; however, I do not see a way to specify the settings like TitleId when using the UPlayFabAPISettings class in the PlayFab plugin.

For more context: we are trying to have the game client communicate with two separate titles (where the players are very likely to have different master accounts). The documentation on multiple logins states that it is possible; however, it doesn't provide an example that uses instanced classes with custom settings for the C++ case.

apisunrealAuthentication
10 |1200

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

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

The Handling Multiple PlayFab Logins - PlayFab | Microsoft Learn you mentioned is for server authentication, the PlayFabApiSettings in PlayFab Unreal plugin doesn't contain a TitleId field for you to set. You may post a feature request for it.

For now, we have come up with a workaround that involves modifying the TitleId retrieval in the PlayFabApiSettings header file and Login APIs, we will test it next week and let you know if it works.

2 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.

agneskripkaite avatar image agneskripkaite commented ·

I had success modifying the PlayFabApiSettings and the PlayFabClientInstanceAPI function I needed since it was still drawing from PlayFabRuntimeSettings. Thank you for your help!

1 Like 1 ·
Xiao Zha avatar image Xiao Zha agneskripkaite commented ·

Glad to hear you solved the problem.

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.