1 (edited by darkelle 2024-09-04 19:39:25)

Topic: WebGl Routes

Hi, i am trying to publish an app that calculates the routes with gps and a city, in unity editor works... but in webgl i got this error about CORS

Access to fetch at 'https: //maps.googleapis.com/maps/api/directions/xml?sensor=false&origin=0,0&destination=Filandia&key=mykey' from origin 'MY WEBSITE IP OR DOMAIN' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

may you have instructions for publish a webgl build with routes of google maps api?

everything wotks fine in editor but in host or any server, fail with CORS error.