Closed Eloren1 closed 3 years ago
Where is this file located at?
I can place this banner everywhere
You should place/save it to Application.temporaryCachePath and put its filepath to AddFile.
I don't know how to do this... I thought I need just put my banner.png to Assets\Sprites\Share and set this path
You can change the file's extension to .bytes, assign it to a public TextAsset variable, and then call File.WriteAllBytes with the TextAsset's bytes property to create a file using it.
Alternatively, you can put the file inside StreamingAssets folder and copy it to temporaryCachePath or persistentDataPath: https://forum.unity.com/threads/native-share-for-android-ios-open-source.519865/page-3#post-3917233. But I'd recommend the first approach when possible.
I don't want to take a screenshot, how can I share my own banner.png? Where should I place it?
new NativeShare().AddFile("\\banner.png").SetSubject("Subject goes here").SetText("Download this game!").Share();
It doesn't work