Is it possible to read a param you defined in HTML via the webplayer?
For example if I would like to do something like this and somehow access the value inside Unity…
<param name="someCustomVar" value="andItsValue" />
Is it possible to read a param you defined in HTML via the webplayer?
For example if I would like to do something like this and somehow access the value inside Unity…
<param name="someCustomVar" value="andItsValue" />
Not that I know, but you can add parameters to your Unity3d file in the HTML page with question marks just like HTML GET. Just make sure you put the same parameters in all 4 places in the generated HTML weblayer page.
Example:
…
… html…
<embed id=“UnityEmbed” src=“4x4Offroad.unity3d**?param1=bla¶m2=fix&test=hello**” width=“700” height=
…
…
You can use the Application.srcValue to read out those parameters with a little bit of string parsing.
that is perfect, thanks.
Would sending params in that way not prevent the browser from properly caching the webplayer if the values and thus the URL where to change frequently (in my case with just about every refresh)?