Camera SDK Unity Sample

Post Reply
Germy76
Posts: 1
Joined: Fri Feb 11, 2011 1:40 pm

Camera SDK Unity Sample

Post 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
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Camera SDK Unity Sample

Post by beckdo »

What problems are you having specifically?
zzzamarron
Posts: 13
Joined: Thu Jan 04, 2007 11:22 am

Re: Camera SDK Unity Sample

Post 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
jcarcamo
Posts: 1
Joined: Thu Mar 07, 2013 8:38 am
Location: Colombia

Re: Camera SDK Unity Sample

Post 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.
Post Reply