I’m trying to use Resources.LoadAssetAtPath and AssetDatabase.LoadAssetAtPath in an editor static function to use in batch mode. But it seems no one works.
My code is this :
static function Export(){
var go : AudioClip[];
go[0] = Resources.LoadAssetAtPath("/assets/sounds/1.mp3",AudioClip);
Debug.Log(go[0]);
.
.
.
}
It works when I put it for example in Start function.
Because on the desktop it would just fail due to the fact that mp3 is not supported at all for playback. Audio is converted to ogg for compressed and otherwise is wav.