question

eleven-ab avatar image
eleven-ab asked

Saving Profile Pictures

Hello, I have a feature where I let the user pick his own profile picture from their gallery or take a picture. This data is available in Texture2D format(Unity game engine) format.

I see you have an API, to load file to entity files of individual players. But, it expects a file location. How do I bypass this?

I do not want to ask the user for write permissions, as they might not approve it.

Is there a workaround for this?

Thank you.
Have a great day ahead

Arvind

Player Data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Rick Chen avatar image
Rick Chen answered

You can save the file in a persistent data path in Unity. Please refer to this Unity document: Unity - Scripting API: Application.persistentDataPath (unity3d.com)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.