Hey!
I know non-webGL builds have some kind of deep linking implementation
https://docs.unity3d.com/Manual/enabling-deep-linking.html
How about WebGL? Unless such plugin/functionality (even 3rd party) exists, ill have to do it myself.
I understand Flash had its own Javascript+Actionscript implementation to do it (and also PHP mirrored data model for SEO).
This doesn’t make much sense ^^. First of all usual Deep linking in the context of websites is something different that deep linking in the context of mobile apps. In the second case it’s about registrating a new URL scheme (in case of Unity the “unitydl” scheme) by the OS so when such an URL is encountered the OS will start a certain registrated application and pass the information in the URL to that application.
In the context of websites that doesn’t really make much sense since web content is already hosted on a web server and only available through a link to the server where it’s hosted. For example this is my parallel Mandelbrot Renderer hosted on github pages. My WebGL application does recognise custom properties in the URL and parses it at load. For example this one. So when opening the webgl application with this link it will automatically center on the given complex number and start rendering at the given zoom level.
If you want to do something similar my URLParameters singleton script is over here. I’ve found this old question where I explain the class a bit more in detail. Note that there’s an old and a new version of the script. The old one used ExternalEval to directly execute JS code in the browser. Since that has been deprecated we have to use a seperate jslib plugin file. My URLParameters script will automatically extract the embedded jslib when you import the script in the editor. It does check the existance of the jslib every time the editor / project is loaded and if it’s missing it will extract the file.
You can also use this class to set the hash / URL fragment from script. This is what my Mandelbrot renderer does every time you change the view / zoom.
Hot stuff!
Thank you @Bunny83, you are a godsend as always. Yes i ment the ‘normal deep linking’ with the hash fragment, as you explained in your second message. That’s why a php mirror of the data model, for creating a crawlable content - but i think it might get blacklisted by googlul for ghosting. Either way, that’s how SWFAddress did it.
The onhashchange callback is what i was looking for, cheers!
PS your Mandelbrot app reminds me of the good ol’ uni days, i also wanted to recreate it in Unity once i got some time, but now i don’t have to, i can simply dig into your code <3