Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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