Simon.Anderson Posted April 11, 2017 Posted April 11, 2017 Hi - is it possible to access the vive class/interface through C# (or even C++)? Or do I need to write my stuff all in UnigineScript? - the documentation/samples seem to suggest this is currently the only way. Thanks, Simon
Simon.Anderson Posted April 12, 2017 Author Posted April 12, 2017 If so - this is pretty important for us - can we request C++/C# hooks in the next release? :)
alexander Posted April 17, 2017 Posted April 17, 2017 Hello, Yes, it's possible. You need to using Interpreter and Reflection classes. Look at our last demo - "Oil Refinery". It's written in C++. Just copy and paste ViveAPI.h and ViveAPI.cpp files from it to your project. At first, call init() method (to find all UnigineScript's function id), then you can call all other functions: getDevicePose, getControllerButtonPressed etc. ViveAPI.h ViveAPI.cpp
alexander Posted April 17, 2017 Posted April 17, 2017 Hello again, I wrote C# version of it. Pros: - You don't need to call the init() method in Vive class - This class is completely static Cons: - Slower than C++ version (because Vive methods called via string name instead of int function_id) ViveAPI.zip
Recommended Posts