Search Unity

Web Player Local Storage Component (for Pro and Indie)

Discussion in 'Assets and Asset Store' started by marceloroca, Apr 18, 2011.

  1. marceloroca

    marceloroca

    Joined:
    Feb 24, 2009
    Posts:
    53
    I have added the HTML5 Storage features to Unity (pro&indie). With this component you can store data locally directly from your Unity web player game .

    "So what is HTML5 Storage? Simply put, it’s a way for web pages to store named key/value pairs locally, within the client web browser. Like cookies, this data persists even after you navigate away from the web site, close your browser tab, exit your browser, or what have you. Unlike cookies, this data is never transmitted to the remote web server (unless you go out of your way to send it manually). Unlike all previous attempts at providing persistent local storage, it is implemented natively in web browsers, so it is available even when third-party browser plugins are not.

    Which browsers? Well, the latest version of pretty much every browser supports HTML5 Storage… even Internet Explorer!" (1)

    You can read more in: http://www.marceware.com/gamekits/html5

    The price of the component in 10$. If u want to test, please send a email to store@marceware.com

    Is in beta stage, but works really good, and you can add 5 to 10 megabyte to the web player storage.

    Thanks

    Marcelo
     
  2. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    I know it isn't its intended use, but could this be used to cache asset bundles in the web player?

    Right now it is possible to cache asset bundles in stand alones using System.IO.File, but it isn't possible to use that approach in web builds. If your "web player local storage component" could be used (or modified) for caching asset bundles (and only download them again when the asset bundle has changed in the server), it will be a really interesting product...
     
  3. marceloroca

    marceloroca

    Joined:
    Feb 24, 2009
    Posts:
    53
    Yes, you can store anything you want, but the data must be serialized to text. This library is a low level access to store/retrieve data, and it's easy to write a library (using this), adding support to something like WWW.LoadFromCacheOrDownload.

    I can write this, but if you read in the Script Reference "Caching.Authorize":

    I never tested, but I think you already have this functionality in your Unity version.

    I can add this feature to my library if the community thinks is useful.

    Thanks for your reply.
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    would not make any sense to store them out there as you can never again load them as asset bundle loading is limited to WWW and WWW will only accept HTTP, HTTPS and FTP in the webplayer, file:// is not allowed for example.

    Loading them through any other way is not possible, independent of the platform
     
  5. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    How it is supposed to work the WWW.LoadFromCacheOrDownload()?
    I have tried to use it instead of "new WWW()", but I haven't got it working... it downloaded the asset bundle again and again.