Apologies for the vague title.
I am integrating Skype in to my Unity application. So I added Skype4Com.dll in Visual Studio and the plugins folder of my Unity project, but the editor throws "error CS0246: The type or namespace name `SKYPE4COMLib' could not be found. Are you missing a using directive or an assembly reference?"
When I added the same dll to a different windows form application, the application built successfully.
Here is the code,
using UnityEngine;
using System;
using System.Collections.Generic;
using SKYPE4COMLib;
public class AudioManager : MonoBehaviour
{
void Start()
{
Skype skype = new Skype();
if (!skype.Client.IsRunning)
{
skype.Client.Start(true, true);
}
}
}
The dll has been added as a reference in Visual Studio.
Below is the error in Unity
Am I missing something?
Did you check if your dll is compatible with Unity? Unity 5 only supports up to .Net 3.5 when importing dlls.
I finally fixed it. The Skype4COMLib.dll that I got from C:\\Program Files (x86)\\Common Files\\Skype was not the correct dll. Unity was looking for Interop.SKYPE4COMLib.dll
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.