Search the Community
Showing results for tags 'function'.
-
Hey, I'm trying to create a function in c++ and export it to UnigineScript. I'm trying to follow the "dot" example you have in the documentation. But I can't get it to work after trying lots of things. The function is defined something like this: void someFunc(const vec3 &a, vec3 &b, vec3 &cl) I am exporting it like this: Interpreter::addExternFunction("someFunc", MakeExternFunction(&someFunc)); Then I call it in script like this: vec3 a, b, c; someFunc(a, b, c); But I get this error message: camera_control.h:222: Variable::getExternClassObject(): can't convert vec3 to struct Unigine::Math::vec3 * __ptr64 What am I doing wrong?
-
Hello Unigine-Team, I tried arround a little bit with Flash Widgets and got a "simple" problem, i don't know how to solve but i think its an easy thing for you :). In attachment you find the "flashTest.zip" file. Here's my problem: I'm trying to call a function out of a class object with flash but it's not working at all. I also tried to add the Flash Widget in the class and call the function there, but that don't work also. I just get the "exception" 20:18:04 Interpreter::getFunction(): can't find "testCall" function PS: If the testCall function is placed in the cpp it works. Hope you can help me. Best regards Graphefruit flashTest.zip