However, what I had actually tried to do in my code was this: AudioClip soundClip = localisedAssetBundle.LoadAsset( "Assets/sound" ) The third example actually would have worked as it is written above. My examples weren't quite correct, as I was paraphrasing them. This also works: AudioClip soundClip = Resources.Load( "sound" ) īut this doesn't: AudioClip soundClip = localisedAssetBundle.LoadAsset( "sound" ) This works: AudioClip soundClip = localisedAssetBundle.LoadAsset( "sound.wav" ) Just as an example of what I'm trying to do: Is there a way to load a file from an Asset Bundle without providing the extension? From what I hear, this was doable in Unity 4 but I'm having the problem using Unity 5 (5.1.2p3). The manifest file does include the extension. However when loading the localised files from an Asset Bundle, if the file extension isn't included in the load call the file can't be found. This is fine when loading the default files from Resources since Unity doesn't require the file extension. oggs and it's not viable to specify which before loading the file. I'm using asset bundles to load localised VO.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |