Hello,
first of all, i want to say that i can't open sample exmple in Unity, that makes my Unity crash.
So i was a bit limited :(
When i run my code, i got this error :
EntryPointNotFoundException: iisu_createDevice
iisuNet.PInvoke.SkDeviceImpl.createDevice (iisuNet.SkDevice& device, System.String configFileName)
iisuNet.PInvoke.SkUtility.CreateDevice (System.String directory, iisuNet.SkDevice& device, System.String iisuConfigPath)
iisuNet.SkUtility.CreateLocalDevice (System.String directory, iisuNet.SkDevice& device, System.String iisuConfigPath)
iisuNet.SkUtility.CreateDevice (iisuNet.SkDevice& device, System.String iisuConfigPath)
iisuNet.SkUtility.CreateDevice (iisuNet.SkDevice& device)
IisuInputProvider.Awake () (at Assets/Scripts/IisuInputProvider.cs:22)
I take a look on the forum but can't get out of this...
using UnityEngine;
using System.Collections;
using iisuNet;
public class IisuInputProvider : MonoBehaviour
{
//the left and right hand positionsµ
private IisuData<iisuNet.Vector3> _leftHand;
private IisuData<iisuNet.Vector3> _rightHand;
//device
private SkDevice _dev;
void Awake()
{
// create the device
SkUtility.CreateDevice(out _dev);
// init device
_dev.Initialize();
//we register the datahandlers that will provide us the data we are going to use
_leftHand = _dev.RegisterDataHandle<iisuNet.Vector3>("PARTS.LeftHand");
_rightHand = _dev.RegisterDataHandle<iisuNet.Vector3>("PARTS.RightHand");
print(_rightHand);
//Start the device, which will start getting input from the datasource (camera, movie,...)
//Due to some Unity specifications, we are using synchronous device access.
_dev.Start(false);
}
/// Gets the left hand of the user in world space.
/// We have to convert the iisuNet.Vector3 to a Unity Vector3.
public UnityEngine.Vector3 LeftHand
{
get
{
_leftHand.UpdateValue();
//Carefull, iisu uses Z-axis as the up-axis and Unity the Y-axis,
//so we have to switch the Z and Y axis.
return new UnityEngine.Vector3(_leftHand.Value.X, _leftHand.Value.Z, _leftHand.Value.Y);
}
}
/// Gets the right hand of the user in world space.
/// We have to convert the iisuNet.Vector3 to a Unity Vector3.
public UnityEngine.Vector3 RightHand
{
get
{
_rightHand.UpdateValue();
//Carefull, iisu uses Z-axis as the up-axis and Unity the Y-axis,
//so we have to switch the Z and Y axis.
return new UnityEngine.Vector3(_rightHand.Value.X, _rightHand.Value.Z, _rightHand.Value.Y);
}
}
/// Manually update the device and process the next frame.
void Update()
{
_dev.ProcessFrame(false);
}
/// Clean-up all resources
void OnApplicationQuit()
{
SkUtility.DestroyDevice(_dev);
}
}
|