question

Frank DiCola avatar image
Frank DiCola asked

PlayFabClientSDK not recognized in Vue 3

I'm building a web app, hoping to use VueJS (version 3) and I'm stuck implementing the PlayFab.js quickstart that was provided. The only file in my project that recognizes PlayFab is my index.html, none of the other Vue files recognize "PlayFab", they say it is undefined.

This worked fine for me before back when I was using simple Javascript, but I want to use Vue to keep things organized. How do I get all the files in this project to recognize PlayFab? My components need to be able access PlayFab functions and properties.

Thanks!

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

·
Seth Du avatar image
Seth Du answered

I am not familiar with Vue 3. For now PlayFab doesn’t provide an SDK specifically for Vue 3, but according to the official documentation, Vue 3 is a framework that is designed for building the interface, it should be able to import external libraries or SDKs. Since it works fine in JavaScript projects, you may consult the Vue3 community or find support from their team to know a proper method to refer the external libraries.

1 comment
10 |1200

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

Frank DiCola avatar image Frank DiCola commented ·

Right now I've just been using the word "window" before everything in order to call functions. (For example, window.PlayFab.settings.titleId)

It's a silly solution, but I guess it will have to do for now.

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.