How can i use api and display data on playcanvas with fetch,async/await function?

How can i use api and display data on playcanvas with fetch,async/await function?

need help

Hi @HasnainX,

To use a Rest service you can use JS fetch in any Playcanvas script of yours. There isn’t anything special here, use it in the same manner you would use it in any other JS app of yours.

To display the results on screen you can use the Playcanvas UI elements, take a look at the examples here:

https://developer.playcanvas.com/en/tutorials/?tags=ui

2 Likes