Hi,
Now I’m making an USB-camera application. In this app, I use mydll for camera management.
mydll’s run() written in ‘C’ manages usb camera.
Actually it worked well, I confirmed camera capture window worked as the unity’s background task.
But when I restarted app with unity’s GUI editor, camera window didn’t start and only unity app worked. So this app only works well at first time. In this case, I have to restart unity program. And I confirmed that mydll was occupied even if I stopped my app in unity.
So I think I have to load dll modules dynamically for this problem. And I have to release them when app stops. Is it correct? Are there anyone help? please let me know…
[DllImport("mydll", CharSet = CharSet.Auto)]
private static extern int run();
private static Thread t;
// Use this for initialization
void Start () {
t = new System.Threading.Thread(new System.Threading.ThreadStart(this.start));
t.Start();
}
private void start()
{
run(); //usb camera program
}