2
\$\begingroup\$

I made a simple Flash game in C# using Unity3D. It interacts well with a web page: There is a textbox for the player to type their name and that name is used in-game.

Now I want to pass the player's name into my game as a URL parameter. How can I read URL parameters from within a Flash game?

\$\endgroup\$
2
\$\begingroup\$

Use Application.absoluteURL.

http://docs.unity3d.com/Documentation/ScriptReference/Application-absoluteURL.html

If navigating to the game from another page, they can pass arguments via a ?query-string that the server can ignore, and that you can parse via string manipulation. If you need to transition to your game without navigating to a new page, you can use an <iframe> and do the same.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.