Jump to content

[SOLVED] ExternClass as a Variable


photo

Recommended Posts

Posted

Please use the pushWorld()/popWorld() functions around your code:

mydata testData;
testData.name = "Hello from C++";
engine->pushWorld();
engine->runWorld("helloStruct", Variable(TypeInfo(TypeID<mydata*>()), &testData));
engine->popWorld();

Posted

This seems to be a so common "mistake" most probably supported by missing clear UNIGINE documentation and C++ examples on mandatory usage of engine->push/popWorld() /engine->push/popSystem() when calling script part from C++.

 

Suggestion:

 

documentation improvement and update of embedded code snippets to include engine->push/popWorld()/System() code

Posted

Ulf, I'll surely revise the docs as soon as possible.

×
×
  • Create New...