Forum Discussion
Reddo
7 years agoMember
Oculus Go - Deleting file from persistentDataPath when UnityWebRequest abort
I'm trying to delete a file in Go's persistentDataPath directory if the download has been aborted on quitting the application
I've tried both OnApplicationQuit and OnDestroy methods which work fine in the Unity Editor and it's persistentDataPath. For example
OnApplicationPause also deleted the file successfully when the Go is in pause mode.
Just wondering if there's another method specifically for the Go and/or Android when quitting the application
I've tried both OnApplicationQuit and OnDestroy methods which work fine in the Unity Editor and it's persistentDataPath. For example
public void OnDestroy() { if (FileExists == 0) { uwr.Abort(); File.Delete(Application.persistentDataPath + "/" + videoFileName); } }But when quitting the app on the Go, the partly downloaded file does not get removed. I've got Write Permisson set to external in Settings.OnApplicationPause also deleted the file successfully when the Go is in pause mode.
Just wondering if there's another method specifically for the Go and/or Android when quitting the application
Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 months ago
- 1 month ago