You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.
When copy is false, the media file will be deleted from the app's private documents directory once it has been added to the camera roll. The default will be copy = true
The text was updated successfully, but these errors were encountered:
So this is definitely cool. However if someone wants to do something like the following sequence:
SaveToCameraRoll
Share*
Delete the file that was saved to camera roll and shared
If I do copy = false during Step #1 then I won't be able to share. I still think the right fix is to add a callback for when SaveToCameraRoll completes.
This is why in iOS they have completionHandler. I really wish Unity just added something beside SendMessage to specifically handle callbacks. It's such bad api design not to. Although I guess 3ps can create a lib thats like a messaging bridge.
However if someone wants to do something like the following sequence:
...
If I do copy = false during Step #1 then I won't be able to share. I still think the right fix is to add a callback for when SaveToCameraRoll completes.
This would be fine, since you can use the ShareCallback when calling Share to delete the file.
This is why in iOS they have completionHandler. I really wish Unity just added something beside SendMessage to specifically handle callbacks. It's such bad api design not to.
I agree with this. We never use UnitySendMessage because it is very sloppy (you are limited to one string argument). So instead we use C# delegates invoked directly from C++/C/Obj-C. It's much much more flexible, but we have to manually handle threading concerns (because most of the time, the thread that calls back into C# isn't UnityMain, and we all know how Unity hates its API's being called on non-main threads).
When
copy
is false, the media file will be deleted from the app's private documents directory once it has been added to the camera roll. The default will becopy = true
The text was updated successfully, but these errors were encountered: