Browse Source

Unity: Ensure that the MessageManager is always initialised before new plug-in instances are created

tags/2021-05-28
ed 6 years ago
parent
commit
cda5c144f4
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp

+ 3
- 2
modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp View File

@@ -668,12 +668,13 @@ static void declareEffect (UnityAudioEffectDefinition& definition)
UNITY_INTERFACE_EXPORT int UnityGetAudioEffectDefinitions (UnityAudioEffectDefinition*** definitionsPtr)
{
if (juce::getWrapperMap().size() == 0)
juce::initialiseJuce_GUI();
static bool hasInitialised = false;
if (! hasInitialised)
{
juce::initialiseJuce_GUI();
juce::PluginHostType::jucePlugInClientCurrentWrapperType = juce::AudioProcessor::wrapperType_Unity;
juce::juce_createUnityPeerFn = juce::createUnityPeer;


Loading…
Cancel
Save