Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to load Android assets that are not compiled with the project

$
0
0

I'm developing a CocosSharp game for both iOS and Android and instead of precompiling all the assets (as BundledResource or AndroidAsset) I want to download them when the game starts.
This has already been implemented and saving the assets works fine.
In iOS I'm also able to use the saved assets with CCSprite for example, so for iOS it's done - great!

But in Android I can't get it to work.
I'm saving the assets to System.Environment.SpecialFolder.Personal which seems to point to the "./files" folder for the app.
The assets are saved properly and I can see them when I look at the file system.
I've also set the CCApplication.ContentRootDirectory to be the same folder that contains the assets.

But when I try to create a CCSprite with one of these assets, it stays blank.
CCApplication.Game.Content also indicates that no assets are loaded.

Does anyone have experience with the thing that I'm trying to do?
Is it even possible to load assets that are not bundled as AndroidAsset in the app?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>