- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
siddharth3322 · Oct 29, 2014 at 08:54 AM ·
assetfileresourcespath
Access path of stored asset
I want to share promo image for my game. At present I have adopted this way, Convert image into texture form and store into project directory and then share.
For this I have used following code
byte[] bytes = texture.EncodeToPNG();
string path = Application.persistentDataPath + "/MyImage.png";
File.WriteAllBytes(path, bytes);
Then use new path for sharing purpose because this reference only access image. I don't want to create another copy of promo image, I directly want to use source image. But can't able to access that image through coding. I don't have any problem regarding placement of image in any folder. At present resides in the Resource folder.
I want path of promo image that was my sole purpose for creating this question.
Comment