Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 mMrDude · Jul 27, 2011 at 03:15 PM · webplayerupdatedownloadversionrefresh

How to refresh my webplayer at runtime

Hi there

I have been stuck on this for quite some time now...

How do I force a web page to download my webplayer instead of using the one that is already in the cache? I don't mean downloading assets into my web player, I mean actually download a fresh copy of the webplayer itself...

Each time I upload an updated version of my web player I have to access it from a different subdomain or give it a new name so the new version will download. How can I get the plugin to go: "Ahhh, there is an updated version on the web, let me download THAT one" instead of "Meh, I already have a file called webplayer.unity3d in the cache, I'll just use that"?

Thanks in advance

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

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by almo · Jul 27, 2011 at 03:21 PM

You could put this in your page:

< META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" >

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
1

Answer by Graham-Dunnett · Jul 27, 2011 at 03:22 PM

The web browser and web server need to agree to not cache the unity3d file. I guess http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html is the detailed technical information you need. But given that the unity3d file is named in your html, can you just prepend some version number onto the unity3d file and make sure the web page fetches the "correct" latest file? So you html loads mygame0001.unity3d instead of mygame.unity3d. (This just moves the caching problem from the unity3d file to the html file.)

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 mMrDude · Jul 28, 2011 at 07:59 AM

@ALMO If I say no-cache, will that mean that nothing on that page gets saved to the cache but stuff I download from within my web player WILL or will also not get saved? I need to save lots of content to the user's hard drive so I will most probably be in permanent conflict with other people trying to 'share' the 50Mb.

@Graham Your method seems the most simple and surefire way to get the latest version downloaded but this still means changing the name each time. My question is this: Out of the 500,000+ Unity devs out there, surely some of them must have made an app for the web player and at some point released an update to that app so how did THEY get the new version to run?

Is there absolutely no way at all from within Unity to se it up that the latest version loads (wether via meta, header, whatever)? Is the absolutely only way to ensure a player plays the latest version of your app to change the name? Is this how the other 500,000 devs do it or is there a 'better' or 'official' or 'right' way to do this?

For example, I have been reading a lot about version numbers lately. The whole WWW.LoadFromCacheOrDownload(filename,version) is quite clear in what it does... but something that I have not seen mention anywhere, nor seen in the examples posted on this site or elsewhere, even the docs, actually show me how to SET the version number for an asset I upload...

So I can download assets by version number but I can't set the version number ? Is there some mystical text that the Unity Plugin does that checks for version number of the file it is supposed to load and then downloads it if needs be or is it down to the devs to implement this functionality?

Again, it boils down to: "What is the best/right/official way of getting the latest version of your app to run from a website?"

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 kevork · Oct 06, 2011 at 11:17 PM 0
Share

Did you have any more luck with this m$$anonymous$$rDude?

Is the best solution to add the version number to the .unity file and update the webpage to point to the latest version?

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Engine not updating to the latest version 1 Answer

Webplayer Engine Version 7 Answers

Unity Web Player Failed To Download Data File 1 Answer

Download assetbundles with Webapp 0 Answers

Web player update 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