Simon.Anderson Posted April 11, 2017 Share 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 Link to comment
Simon.Anderson Posted April 12, 2017 Author Share Posted April 12, 2017 If so - this is pretty important for us - can we request C++/C# hooks in the next release? :) Link to comment
alexander Posted April 17, 2017 Share 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 Link to comment
alexander Posted April 17, 2017 Share 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 Link to comment
Simon.Anderson Posted April 19, 2017 Author Share Posted April 19, 2017 Awesome. Thanks for that! Link to comment
Recommended Posts