Skip to content
/ BlobIO Public

This package adds the feature of letting the user download arbitrary data as a file or load a local file of the user's choice in the Unity WebGL build.

License

Notifications You must be signed in to change notification settings

ruccho/BlobIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlobIO

This package adds the feature of letting the user download arbitrary data as a file or load a local file of the user's choice in the Unity WebGL build.

2020-12-28 22-08-03 mp4

Demo

Requirements

This project is built with Unity 6000.0.10f1.

Installation

This package is made for Unity Package Manager (UPM).

  1. Open Window > Package Manager window.
  2. Click + > Add package from git URL.
  3. Type https://github.com/ruccho/BlobIO.git?path=/Packages/io.github.ruccho.blobio and click Add.

Usage

using Ruccho.BlobIO;


public void LoadText()
{
    BlobIO.MakeUpload((f) =>
    {
        Debug.Log($"Filename: \"{f.Filename}\"");
        Debug.Log($"Loaded text: {Encoding.UTF8.GetString(f.Data)}");
    }, ".txt");
}

public void SaveText(string text)
{
    BlobIO.MakeDownloadText(text, "example.txt");
}

About

This package adds the feature of letting the user download arbitrary data as a file or load a local file of the user's choice in the Unity WebGL build.

Resources

License

Stars

Watchers

Forks

Packages

No packages published