Canon EDSDK integration with Unity


I’ve faced a problem when trying integrate Canon EDSDK C# wrapper with Unity’s Mono.
Used C# wrapped and code which handles this wrapper was successfuly working on .NET. WPF application captures photos, takes Live View. But when I try to launch the same code bundle on Unity, I am having an issue with saving photo on PC’s HDD. Unity handler script is successfuly initializing EDSDK library and sending command to camera. So far it’s all Ok, but when camera takes a photo, and tries to save it on Host, it fails. At the camera’s small screen starts to blink icon which says there is not enough space on disk. On another camera (also Canon), in the same situation there was poping up text “PC FULL”. In the same time camera is successfuly saving photos on internal storage (SD), even when code is executed in Unity environment.

I have stuck on the issue and have no idea how to fix it. Please, help!

What I’ve tried:

  • run Unity with administrator rights
  • set all existing rights to all
    existing users of OS for photo saving
  • play with EDSDK
    CanonCamera.SetCapacity(int, int)
    method, setting different values for

Hi, yes. Not straight solution, but a workaround using additional .NET process. In my case it’s .NET console application, which is being launched by Unity in particular conditions. This additional application process uses C# EDSDK wrapper and handles Canon camera Live View. Then it streams Live View images bytes using Tcp Socket into Unity. Something like TCP Client-Server principle. This way console application plays like a feeder, sending data, and within Unity Socket listener receives data and uses it.

@huyakinemota I use the wrapper from here:
and copied all necessary dlls in the assets folder. I use the 64bit binaries.

The ddls. work without problems as winforms/wpf application.

But initializing the SDK from a unity plugin throws “INTERNAL_ERROR”. I tried also the initialization from a new Thread/STAThread without success.

I have the same problem with the official wrappers included in the sdk

Did you find a solution?

I’m just getting started with EDSDK / Unity integration on Mac OSX. Can you guys share a few bits of how to get started with this? Can’t seem to get the external framework/bundle to be read by Unity. Any help/examples would be amazing!

I know this thread is old, but would you mind sharing your code?
I’ve been struggling with this for days.
I can successfully send a photo command to the canon camera to take a photo, but I can’t download the photo or open live view. ,I know this thread is old, but would you mind sharing your code here?
I’ve been struggling with this for days, trying to make the EDSDK work with unity. I can successfully send a photo command to the camera and take a pic, but I can’t download the photo or open the live view.