Question by
TheFoundation · Aug 22, 2016 at 04:29 PM ·
audionative pluginc++
Read asset file during native audio plugin initialization
How can I read a text file located in the asset folder from within the C++ UnityGetAudioEffectDefinitions callback of a native audio plugin?
int UnityGetAudioEffectDefinitions(UnityAudioEffectDefinition*** definitionptr)
In C# I can load data like:
TextAsset bindata = Resources.Load("Test") as TextAsset;
Then I can pass bindata.bytes to the C++ plugin. But where can I execute that before UnityGetAudioEffectDefinitions gets called?
Can I execute some C# code when the scene (or mixer) is loaded? I know I can use Awake of a MonoBehaviour but as far as I know this is not guaranteed to be executed before UnityGetAudioEffectDefinitions.
Comment