Switching Unity build to WebGL errors

When i try to change unity build to WebGL i got few errors like “Web3GL does not exist in the current context” also its looks like ‘Moralis’ namespace show error too. I tryed with tutorial project, downloaded from github and still same problem.

When Unity build mode is on Windows its work all fine, but for WebGL its not working.

Which tutorial project? Which Moralis game kit version and Unity editor version are you using? Do you get any errors in Unity or is it only in your code editor?

Tutorial for connecting unity with PlayFab Azure

I downloaed that project and put in my unity editor 2021.3.12f1

And yes i got error in console in unity editor

Set up the moralis webgl template and then go to build > webgl > switch platform. This will import the classes which you are seeing.