Publisher | Marks |
---|---|
File size | 121.59kB |
Number of files | 5 |
Latest version | 2 |
Latest release date | 2022-11-21 01:39:10 |
First release date | 2020-10-27 12:21:11 |
Supported Unity versions | 2018.4.2 or higher |
DESCRIPTION
This asset is used to call the OS sharing functionality on the web. It can be used to share text, images, videos, etc. In addition, this asset also provides functionality to download files.
Please note that this asset, as all of my other jsplugin assets, don’t work in the editor. Only in the actual build.
This asset can be used as follows:
- C#->JS. When you have a byte array that you generated/fetched from C#, and you want to share/download.
- C#->JS. You have the file in the JS side, but you call the share/save code from C#, using the path of the file stored in JS. This is very fast and the preferred method when you already have data in the JS context, because you avoid having to transfer and decode to C# first before sharing/saving.
- JS->JS. You can have your own jsplugin and call my js functions in it, for example. Similar to number 2, you already have the data in the JS context, but you don't want to invoke the share/download functionality from C#, but use directly from JS instead.
An example usage of my asset is taking a screenshot as a texture, then encoding it to png to get a byte array representation of it, then finally using the share/save functionality of my asset to share the pic with your friends and/or download it to your phone.
If you like my plugin, please consider leaving a review. It helps me immensely and encourages me to improve the plugin further, and other people to support my work :).