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 mabit · Dec 31, 2011 at 03:44 PM · webplayerdatabasehighscorescrossdomain.xml

Unable to get high scores

I have created a server side high score table using the Unify tutorial http://www.unifycommunity.com/wiki/index.php?title=Server_Side_Highscores

This works great in my editor, but when I build it hangs on loading scores. As it is in the WebPlayer I cannot see error messages, but it looks the same as when the editor could not find my crossdomain.xml file.

The crossdomain.xml is in the root of the server and to make sure the game is in the root too.

If the editor can use it I would have thought the build version would find it too.

Is there a way to turn on debug mode on web builds to see if there is errors?

You can see the problem here. This is no where near finished.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by MartinCA · Jan 01, 2012 at 05:03 AM

For web player debugging, refer to this article - http://unity3d.com/support/documentation/Manual/Web%20Player%20Debugging.html. Do note that for Win7/Vista, the UnityWebPlayer log files are located in OSDrive:/Users/UserName/AppData/Temp/UnityWebPlayer/log

And for a side note - the method depicted here for handling highscores is very unsafe. While it is a good tutorial to get started on working with Unity and remote web servers, it is not something I would use for a production build. The scores are managed on the client side, and the user can easily spoof the scores by sending a fake submit request. Hashing the request has no effect here since it too is done on the client side in JavaScript - which is a plain text script anyone can view and see the hashing algorithm.

The best practice would be to do all the score logic on the server side through remoting - but on small scope projects that is only feasible for UI games / applications. You probably don't have the resources to run a dedicated session server to keep track of all the game states :)

The second option would be to encrypt the score value in the Unity player before transmitting it, and decrypting it on the server side. That method still works on the client side, that is true, but disassembling a Unity project or deciphering your encryption protocol will take more time than simply clicking "View Source" on a web page. And to add a little more security to that, obfuscate the scores when stored in your application memory to make it more difficult to simply memedit the player.

Remember, as a general rule of thumb - ANYTHING on the client side is visible to the user. The question you should ask yourself is what method is the most cost efficient, and for the most part, adding some basic encryption to the client side will suffice.

Btw, I tried to run your game, but it doesn't work. The play button doesn't do anything and the highscore table displays loading all the time.

I know I went a bit off-topic with that, so excuse me for the long read and good luck with your game :)

Happy new year!

Comment
Add comment · Show 2 · 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 mabit · Jan 01, 2012 at 05:42 AM 0
Share

Hey there and thanks for the answer and Happy New Year to you too.

I have had a look at the debug site before posting the question but I dont have a log folder on Windows 7, its not where its stated on the wiki.

Yeah the problem is that the game wont pull down the high scores and sits at Loading Scores. But this is only on WebPlayer, when I compile to standalone or run in editor its fine. Also a bit concerned about you saying the "Play" button is not working as its working for me.

I am just a uni student having ideas and trying to make them work and if they make a fun game thats even better. Plus its all good practice for Global Game Jam in a few weeks.

avatar image mabit · Jan 03, 2012 at 06:08 AM 0
Share

This turned out not to be a Unity problem but a webhosting one. Becuase my webhost truncated the www of the web address this then stopped it from finding the crossdomain.xml

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

6 People are following this question.

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

Related Questions

Crossdomain policy trouble 1 Answer

Yet another case of Unity Web Player Crossdomain.xml troubles 5 Answers

WWW doesn't work on localhost eventhough crossdomain.xml exists 1 Answer

What is most efficient way to store 'high scores' in game in unity? 1 Answer

Server High Scores - crossdomain.xml 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