Set environment variables for wasm target? #5737
-
Hello, I'm currently compiling my game to run in the browser, however some variables are read mid-game from env::var(). I was wonder how I would go about setting environment variables in the browser |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Try to use C/S architecture? |
Beta Was this translation helpful? Give feedback.
-
You won't have access to environment variables from WASM running in the browser. How do you intend to set those variables for your players? Some javascript variables? Something in the URL fragment? A query to get those variables? A cookie? You'll have to decide how to expose those variables to your game, and it depends on where they come from. |
Beta Was this translation helpful? Give feedback.
You won't have access to environment variables from WASM running in the browser.
How do you intend to set those variables for your players? Some javascript variables? Something in the URL fragment? A query to get those variables? A cookie?
You'll have to decide how to expose those variables to your game, and it depends on where they come from.