1

I am facing some issues with ODR (On Demand Resource) in Unity. When I am downloading some resources using OnDemandResourcesRequest and it's in progress,I am just killing the app by swiping it or moving to background, what I found is no progress in download.The painful situation here is ,it never resumes again.

I am testing it in iPhone 6s after downloading from TestFlight. My App is built in C# Unity.

In Objective C,there is a method in NSProgress which allows to pause,resume and cancel an active On demand resource download.But I am not finding such methods in Unity.

Reference: https://developer.apple.com/library...ptual/On_Demand_Resources_Guide/Managing.html

Can anyone help me to find a way to resume ,pause and cancel a current download in Unity (OnDemandResourcesRequest) ?

1 Answers1

1

You can't pause, resume or cancel active downloading with Unity's implementation of the OnDemandResourcesRequest API.

To get those features you have to write your own plugin in Objective-C, compile or place the source code in your Assets/Plugins/iOS folder in Unity then call it from C#. This shouldn't be hard if you're already an iOS developer.

Programmer
  • 121,791
  • 22
  • 236
  • 328
  • I am wondering what happens actually when we kill the app or pressed home button On Demand Resource Download stops downloading in iOS Devices ,not all the time.I am downloading AssetBundles via On Demand Resource in test flight. Please suggest me any work around .Am I missing something ? – Jitendra Gochhayat Apr 26 '18 at 13:17