lundi 17 décembre 2018

What should be the code architecture to download and cache offline data (Images/Videos/3d Models) ?

I'm developing an application which has a 3D room. Each room is a 3d model and can contain media boards. each media board contains image(s) as slides or video. I have created following Data Models :

class Room {
 string id;
 string room3dmodellink;
 List<Mediaboards> mediaboards;
}

class Mediaboard{
 string id;
 string mediaboard3dModleLink;
 List<Slide> slides;
}

class Slide{
 string id;
 string imageLink;
}

These data models are populated from server. i need to know how to architect this code to download and cache all models and images in local storage and get/Load from cache on demand, Also should have mechanism to update cache/offline data. Where should i store path of the locally downloaded models and images ? Storing path of downloaded images/models in these models doesn't make sense to me. Need Suggestion/solution. Thanks

P.S: I'm using Unity 3D and C#.

Aucun commentaire:

Enregistrer un commentaire