Page 1 of 1

Camera SDK Unity Sample

Posted: Fri Feb 11, 2011 1:43 pm
by Germy76
Greetings,

I recently downloaded the camera SDK and it came with a Unity sample. I have attempted to get it working, I built and compiled the .dll file and it still doesn't work. Has any one tried to get this working? Could anyone give me a hand please, it would be most appreciated.

Thanks,
Germy76

Re: Camera SDK Unity Sample

Posted: Tue Feb 15, 2011 3:56 pm
by beckdo
What problems are you having specifically?

Re: Camera SDK Unity Sample

Posted: Tue Jun 07, 2011 7:18 am
by zzzamarron
The unity sampleonly works with insight VCS??

I have compiled de dll and use de cs inunity and does not seem to work

Re: Camera SDK Unity Sample

Posted: Thu Mar 07, 2013 9:27 am
by jcarcamo
Hello,

I have the same problem here. First of all the c# script has to be renamed to match the class name (unity restriction), after that Unity shows me the error: "EntryPointNotFound for VRPNTick()".

When I compare the Plugin.cpp code against the c# script I notice that the only method they have in common is VRPNStartup, the other methods don't match.

I believe the Unity Script included in the sample uses a different dll, not the one that produces the Plugin.cpp in the sample.

Here's the list of methods from each file:
OptiTrackPlugin.cs:

Code: Select all

    [DllImport("OptiTrackPlugin")]
    private static extern void VRPNStartup();
    [DllImport("OptiTrackPlugin")]
    private static extern void VRPNTick();
    [DllImport("OptiTrackPlugin")]
    private static extern float VRPNPositionX();
    [DllImport("OptiTrackPlugin")]
    private static extern float VRPNPositionY();
    [DllImport("OptiTrackPlugin")]
    private static extern float VRPNPositionZ();
    [DllImport("OptiTrackPlugin")]
    private static extern float VRPNOrientX();
    [DllImport("OptiTrackPlugin")]
    private static extern float VRPNOrientY();
    [DllImport("OptiTrackPlugin")]
    private static extern float VRPNOrientZ();
    [DllImport("OptiTrackPlugin")]
    private static extern float VRPNOrientW();
Plugin.cpp:

Code: Select all

    void EXPORT_API VRPNStartup()
    void EXPORT_API OptiTrackTick()
    int EXPORT_API OptiTrackCameraCount()
    int EXPORT_API OptiTrackObjectCount()
    float EXPORT_API OptiTrackObjectX(int ObjectIndex)
    float EXPORT_API OptiTrackObjectY(int ObjectIndex)
    float EXPORT_API OptiTrackObjectArea(int ObjectIndex)
Also if I change in the C# script the name VRPNTick() for OptiTrackTick(), Unity crashes.

I'm not very familiarized with the Camera SDK, but still I couldn't find within the cameralibrary.h any method that resembles this "VRPN"s

Thanks in advance for your help.