I am trying to make a radio system with bass.dll and i ve imported the library and the plugin in asset, but i have an error when i want to execute it The script code is: Code (CSharp): using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using UnityEngine; using Un4seen.Bass; public class testradio : MonoBehaviour { public string url = "http://edge126.rdsnet.ro:84/profm/profm.mp3"; private int stream; // Use this for initialization void Start() { Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_NET_PLAYLIST, 0); Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero); stream = Bass.BASS_StreamCreateURL(url, 0, BASSFlag.BASS_DEFAULT, null, IntPtr.Zero); PlayStream(url); } public void PlayStream(string url) { if (stream != 0) { Bass.BASS_ChannelPlay(stream, false); } else { Debug.Log("BASS Error Code = " + Bass.BASS_ErrorGetCode()); } } public void StopStream() { Bass.BASS_ChannelStop(stream); } // Get the Channel Information public string GetChannelInfo() { BASS_CHANNELINFO info = new BASS_CHANNELINFO(); Bass.BASS_ChannelGetInfo(stream, info); return info.ToString(); } public void SetVolume(float value) { Bass.BASS_SetVolume(value); } void OnApplicationQuit() { // free the stream Bass.BASS_StreamFree(stream); // free BASS Bass.BASS_Free(); } } and the error is DllNotFoundException: bass
A lot of this might have to do with how that library is set up. Check that you put all the files in the right place in your Unity project, such as the native DLLs have to go in specific folders within the Plugins folder. Look for a general Unity FAQ on native libraries, and also look for specific documentation that came with bass.dll.