[英]The type or namespace 'SKYPE4COMLib' could not be found - Unity3d
Apologies for the vague title. 抱歉,标题含糊。
I am integrating Skype in to my Unity application. 我正在将Skype集成到我的Unity应用程序中。 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?"
因此,我在Visual Studio和Unity项目的plugins文件夹中添加了Skype4Com.dll,但编辑器抛出“错误CS0246:找不到类型或名称空间名称'SKYPE4COMLib'。您是否缺少using指令或程序集引用? “
When I added the same dll to a different windows form application, the application built successfully. 当我将同一个dll添加到其他Windows窗体应用程序时,该应用程序成功构建。
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. 该dll已添加为Visual Studio中的参考。
Below is the error in Unity 以下是Unity中的错误
Am I missing something? 我想念什么吗?
Did you check if your dll is compatible with Unity? 您是否检查过您的dll是否与Unity兼容? Unity 5 only supports up to .Net 3.5 when importing dlls.
导入dll时,Unity 5仅最多支持.Net 3.5。
I finally fixed it. 我终于解决了。 The Skype4COMLib.dll that I got from C:\\Program Files (x86)\\Common Files\\Skype was not the correct dll.
我从C:\\ Program Files(x86)\\ Common Files \\ Skype获取的Skype4COMLib.dll不是正确的dll。 Unity was looking for Interop.SKYPE4COMLib.dll
Unity正在寻找Interop.SKYPE4COMLib.dll
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.