Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Mar 31, 2015 at 06:36 AM by Andres-Fernandez for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Andres-Fernandez · Oct 02, 2014 at 02:26 PM · webplayerembedwebpage

Is there a way to get the page that my WebPlayer is embedded into?

As the question says, is there a way of getting the html file that contains the webplayer embedded without knowing the name of the file? I know you can use Application.dataPath and Application.absoluteURL to get the path to the folder and the player data file respectively (I have made some tests) but I don't know if there's a method to get the actual file. Any ideas?

Thanks in advance.

[Edit] Besides parsing some parts of the html code (see comment to the answer by @brianturner) I think it can be useful to perform a connection check as in this answer, but made from a webplayer.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

  • Sort: 
avatar image
0
Best Answer

Answer by Andres-Fernandez · Mar 31, 2015 at 06:35 AM

So, yeah. A long time has passed since I asked this question, but I've just come across the solution. It was explained a year ago by @bernardfrancois at the forum here and also better explained in a blog post here. So all credit goes to him.

It looks like you can access the LocationObject using UnityObject2.instances[0], and by accessing the LocationObject you have access to all the url stuff you may need (href, pathname, search, you name it). Again, credit to @bernardfrancois.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by steakpinball · Oct 02, 2014 at 02:43 PM

I haven't tried it, but have you looked into using javascript running in the web page and sending that information back into your player? http://docs.unity3d.com/Manual/UnityWebPlayerandbrowsercommunication.html

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Andres-Fernandez · Oct 03, 2014 at 06:34 AM 0
Share

Thanks for the response. Yes, I've thought of that (actually I make use of the ExternalCall function often to communicate with the page in other projects). But that's exactly what I want to know if it's avoidable.

In this case it's a simple problem, I just want to know whether the html tag has a "lang" attribute to detect the language of the page and set the default language of my game. So I need a way to get the html file (in case there is way).

As plan B, I'm already working in the usual communication with the page using the ExternalCall.

Follow this Question

Answers Answers and Comments

27 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is there a Unity equivalent to FlashVars? 2 Answers

Embedding Fonts Unity Web Player Windows 1 Answer

.unity3d file gets deleted automatically from FTP clients 1 Answer

embed web player without javascript 1 Answer

Connecting an html web page with unity web player 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges