doesn't work on Unity Web player. #1
Labels
No labels
bug
enhancement
high priority
low priority
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
andyburke/UnityHTTP#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hey,
I looked at ur code and it looks really nice and working perfectly in Unity Stanalone applicaiton. When I try to call from Webplayer environment, request always return null even inside editor. Can someone give me example working code for Unity webplayer?
Can you give me some more information? Can you show some of the code or create a small sample project that I could try out?
Hi,
Thanks for the reply.. Attached file is the test project I created. I
already put a test url link so you can actually try calling to this url. It
prefectly works on Unity standalone but when you switch this one to the
Unity webplayer, request becomes null.. I really appreciate for your help.
On Sat, Mar 24, 2012 at 10:34 AM, Andy Burke <
reply@reply.github.com
Thet Naing Swe
Co-Founder & Chief Creative Director
HP: 81137017
Twitter: @thetnswe
Fan page: http://www.facebook.com/rivaledge
Unfortunately, github doesn't allow attachments. You'll need to put your file somewhere (in Dropbox, or on a site).
This may be related to 'socket policy' for the web client. For instance, I believe when I was testing the web player stuff with the HTTP client, I had to have a 'socket policy server' running. Here's a trivial example that will work with node.js, but there are others around as well:
Hi Andy,
I didn't know that Github doesn't accept attachments.. :) I put the file
into the http://dl.dropbox.com/u/8302740/HTTPWebplayerTest.rar ..If it's
a socket policy, I don't understand why it does work when I tried calling
with normal WWWForm.. I am totally noob to the web..
Thet
On Tue, Mar 27, 2012 at 7:36 AM, Andy Burke <
reply@reply.github.com
Thanks for adding a link to the attachment. I will try to take a look when I get a chance.
I believe that the difference is that this HTTP library opens direct sockets, and Unity is set up to require a policy when doing that from the web player. They allow it when using the WWW object, but not when opening a bare socket.
I think the next best step for you to take would be to either:
If you're running a socket policy server on the same server your unity webclient is being served from and the HTTP plugin still doesn't work, then there's likely a bug. If it does start working, then the policy server is a definite requirement and I'll add that to the documentation.
Otherwise, when I get a chance I will test this out, but I'm very busy for the next month or two at the least on a contract, so I may not be able to test this all that quickly.
Thanks Andy,
I will try and test this policy thing and will give you the result that
it works or not.. I am currently in the need of this working for webplayer
so I will have to try hard fixing on it.. Thanks alot for ur help.
On Tue, Mar 27, 2012 at 10:14 AM, Andy Burke <
reply@reply.github.com
Any luck?
No.. I am waiting for my server engineer to add the port policy to the
server.. I will let you know if it works or not.. :)
On Wed, Mar 28, 2012 at 7:55 PM, Andy Burke <
reply@reply.github.com
Thet Naing Swe
Co-Founder & Chief Creative Director
HP: 81137017
Twitter: @thetnswe
Fan page: http://www.facebook.com/rivaledge
Thanks, interested to know how this works out and want to fix the issue if it turns out that it's not just the socket policy.
My Server engineer just came back and we tried to put the socket policy
into our server but it just does't work... I doubt that the TCPClient
doesn't even looked at the Crossdomainpolicy at all and Unity just reject
it.. :(
On Thu, Mar 29, 2012 at 3:39 AM, Andy Burke <
reply@reply.github.com
Thet Naing Swe
Co-Founder & Chief Creative Director
HP: 81137017
Twitter: @thetnswe
Fan page: http://www.facebook.com/rivaledge
Ok. I'll try to take a look as soon as I get some free time.
Sent from my iPad
On Mar 30, 2012, at 12:05 AM, thetnswereply@reply.github.com wrote:
Cool.. That would be really useful.. :) I have no experience at all with C#
TCPClient
On Fri, Mar 30, 2012 at 3:24 PM, Andy Burke <
reply@reply.github.com
Thet Naing Swe
Co-Founder & Chief Creative Director
HP: 81137017
Twitter: @thetnswe
Fan page: http://www.facebook.com/rivaledge
@andyburke I just came across the same issue building for Web Player. Hosted the NodeJS server on the domain and now instead of saying "Unable to connect, as no valid crossdomain policy was found", it simply says "Connection refused". Thoughts, suggestions?
@hboylan Hmm. Can you see the connection attempt on the server?
It must be reaching the crossdomain.xml via the TCP server on port 843 since the error message changed, but it still doesn't reach my HTTP server on port 8080
Could you show the url you're using? Are you sure it's trying to connect on 8080? Does your policy server allow connections on 8080?