The game I currently has about 100 characters. So importing all the character atlas and animation with the game app wouldn't be a good approach (making the download way too big).
So what should I be doing if I want to including the character animation in separate download process.
Currently I can export the character's tk2dSpriteAnimation as .unity3d file, download them, and change the library of tk2dSpriteAnimator of character animation
IEnumerator DownloadPrefab(string url)
{
WWW downloadedFile = new WWW(url);
yield return downloadedFile;
if (downloadedFile.isDone)
{
AssetBundle assetBundle = downloadedFile.assetBundle;
spriteAnimation = assetBundle.Load("BattleAnim-CharacterA", typeof(tk2dSpriteAnimation)) as tk2dSpriteAnimation;
}
else
{
print("downloadedFile is null");
}
}
characterSpriteAnimator.Library = spriteAnimation;
But this way will make the user download a lot of characters every time they want to initiate a battle (The battle consists of 7 characters vs 7 characters, so if every sprite animation library size is 1.5 MB on average, that will be 21MB to download for just 1 battle).
Is there a way to save the tk2dSpriteAnimation I downloaded into prefab in the deployed app, so that I do not need to download the sprite animation everytime the user initiate the battle?