- 最后登录
- 2019-12-2
- 注册时间
- 2012-8-25
- 阅读权限
- 90
- 积分
- 34660
- 纳金币
- 38268
- 精华
- 111
|
1。将CanmeraDll.dll文件放入根目录 2。编写如下声明代码 - [DllImport("CanmeraDll")]
- public static extern int Net_Cam_Init(ref int CamID, ref int w, ref int h, ref int BFormat);
- [DllImport("CanmeraDll")]
- public static extern IntPtr Net_Cam_GetFrameBuff(ref int Cam, ref int Size);
- [DllImport("CanmeraDll")]
- public static extern int Net_Cam_UnInit();
复制代码3。调用代码 - void Start () {
- if(NetCamWrapper.Net_Cam_Init(ref Cam_Id, ref wid, ref hig, ref BFormat) == 1){
- NetCamStatus = true;
- Debug.Log("NetCamera Have Init!");
- }else
- Debug.Log("NetCamera Don't Init!");
- }
复制代码 |
|