Hi
PersistentEngine prefab contains RuntimeLanguages component, which calls TransferFromManager method, which get reference to AdvGame.GetReferences ().speechManager, which contains 1600 Lines (of text) with 3 CustomTranslationAudioClips per Line, so in total it’s 1600 * 3 = 4800 audioclips at present time for project(and can be more after adding new languages).
But all these audio clips being loaded at first start and produce big memory footprint. How can i manage loading audio clips per scene, not for all game, for more optimized resource control and better scene loading perfomance? Because current optionnot suitable, especially for mobile devices.
Thanks
Comments
Unity - 2018.2.14f1
Screenshot with SpeechManager - http://take.ms/eoIcm
I'm trying to say that we are aiming not on how to speed up game loading (I'm talking about our current task, in overall it's important too) but to reduce memory consumption. All these Import setting etc. can do nothing with it. So we thought, that it could be great, that AC will load Speech for current level only (and maybe Global speech like Inventory events) from level's own folder and even for the language set for this moment. That could reduce memory usage a lot
{
isPlayer = _speechLine.isPlayer;
lineID = _speechLine.lineID;
scene = _speechLine.scene;
owner = _speechLine.owner;
text = _speechLine.text;
description = _speechLine.description;
textType = _speechLine.textType;
translationText = _speechLine.translationText;
customAudioClip = (language == 0) ? _speechLine.customAudioClip : null;
customLipsyncFile = (language == 0) ? _speechLine.customLipsyncFile : null;
customTranslationAudioClips = null;
customTranslationLipsyncFiles = null;
tagID = _speechLine.tagID;
#if UNITY_EDITOR
orderID = _speechLine.orderID;
orderPrefix = _speechLine.orderPrefix;
#endif
}
That will prevent non-original language audio from being loaded - does that work for you? (Provided you've the original language selected at runtime)