public void releaseRunningInstance(FmodEventAudioSource runningSource) { if (runningSource == null || runningSource.getSource() == null) { Debug.LogError(getErrorPrefix() + "Invalid data was passed for FmodEventAudioSource"); return; } if (runningSource.getSource() != m_event) { Debug.LogError(getErrorPrefix() + "FmodEventAudioSource tried to load event '" + runningSource.getSource().getName() + "' from the bad pool."); return; } FMOD.Event instance = runningSource.getRuntimeEvent(); if (m_activeSources.Contains(runningSource)) { if (instance != null) { m_availableEvents.Add(instance); } m_activeSources.Remove(runningSource); } else { Debug.LogError("this should not happen; Ever."); } }
public void releaseRunningInstance(FmodEventAudioSource runningSource) { if (runningSource == null || runningSource.getSource() == null) { Debug.LogError(getErrorPrefix() + "Invalid data was passed for FmodEventAudioSource"); return ; } if (runningSource.getSource() != m_event) { Debug.LogError(getErrorPrefix() + "FmodEventAudioSource tried to load event '" + runningSource.getSource().getName() + "' from the bad pool."); return ; } FMOD.Event instance = runningSource.getRuntimeEvent(); if (m_activeSources.Contains(runningSource)) { if (instance != null) { m_availableEvents.Add(instance); } m_activeSources.Remove(runningSource); } else { Debug.LogError("this should not happen; Ever."); } }