[SOLVED] Does PlayCanvas support URL parameters or some way to access commandline arguments?

Let me explain what i am trying to do: I don’t have much experience with REST APIs (GET, PUT, POST,etc) or any other kind of online requests but i know some assets you can pass some command line arguments like the image below to tell the app to use them inside de application once it opens. Does PlayCanvas have some way to access it?

Example 1 - Pass arguments as command lines

Example 2 - Pass arguments as URL parameters after “?” and “&” (in this case the first argument is after “?” and any number of other arguments needs to be separated with “&”)

I wish i could use this to make my app start different just by changing the URL in case make a website and desire to open a playcanvas app in another tab with user specific data be sent before play canvas open the game

Yes, URL params are supported as it’s a standard browser/window JS feature

Nice! How can i access it in my scripts?

It’s standard JS so any guide like this will work: How to Get URL Parameters with JavaScript - SitePoint

1 Like

I will look at it and make tests! Thanks

EDIT: This is exactly what i needed! Thanks!!! :smiling_face_with_three_hearts: