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 /
avatar image
0
Question by ABerlemont · Feb 27, 2015 at 01:33 PM · webplayerwwwcrossdomain

Using WWW class locally (webplayer)

I'm trying to load AssetBundles with the WWW class.

In the editor I don't have any issues but when I build the game in webplayer the www object can't load my resource and throw me this error :

"Rejected because no crossdomain.xml policy file was found"

I tried to add an crossdomain.xml with the basic generic allow syntax near the html page (same folder)

But nothing.

Any ideas for how to make the WWW class work in a file:/// context ?

Many thanks !

Comment
Add comment · Show 6
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 Landern · Feb 27, 2015 at 01:54 PM 0
Share

is this literally deployed on your computer? Is it hosted? Are you using the file:/// with a fully qualified path? You do realize that you're trying to break the sand boxing of your browser and also consider, if you were able to do this, couldn't you just post a webplayer build and try and snake files from any computer and stuff it away? That isn't to say you couldn't request a file location through normal dialogs and javascript through browser communication and unity. Consider what you're asking the webplayer, hosted in a browser to actually do security wise.

avatar image ABerlemont · Feb 27, 2015 at 02:00 PM 0
Share

I understand that this is touchy security wise but I thought that there would be a way to bypass that in a local -on my own computer- context. $$anonymous$$aybe I'll just use System.IO for debuging and WWW for release.

Thanks for the time ;) !

avatar image ABerlemont · Feb 27, 2015 at 02:37 PM 0
Share

But I can't find how to load assetbundle through System.IO :)

avatar image Landern · Feb 27, 2015 at 03:19 PM 0
Share

http://answers.unity3d.com/questions/292284/webplayer-datapath.html

avatar image ABerlemont · Feb 27, 2015 at 03:26 PM 0
Share

Yup, read that one already. Doesn't work in my case. Application.dataPath contains "file://" and if you don't use "http://" with a local webserver it won't work.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by abi-kr01 · Feb 28, 2015 at 08:05 AM

you can go to your edit->project seatings->editor and in the host url give your url as http://127.0.0.1 and testit

Comment
Add comment · Show 3 · 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 ABerlemont · Mar 02, 2015 at 04:02 PM 0
Share

Tried it. 127.0.0.1 only works if you have a local webserver.

avatar image abi-kr01 · Mar 02, 2015 at 05:13 PM 0
Share

just replace with your site name like "http://answers.unity3d.com/" then it will work from everywhere

avatar image ABerlemont · Mar 03, 2015 at 12:04 AM 0
Share

I'm guessing you don't suggest to literally write "http://answers.unity3d.com/" in my file path ? I don't have a website. I work locally :)

But as Landern said it's a matter of security. It's impossible to do what I want to do. I'm currently using a local webserver (wamp server) to simulate the online part.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

21 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

Related Questions

accessing sub directory perhaps an crossdomain error 1 Answer

Error with Facebook's crossdomain file? 0 Answers

Unity Web Player Load Object Error crossdomain.xml 1 Answer

Security.PrefetchSocketPolicy problem. 0 Answers

Can't access crossdomain.xml - web player 1 Answer


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