rahul.ranjan Posted December 2, 2016 Share Posted December 2, 2016 hi I have created a getter and setter class in external c++ code and exported my class as:- ExternClass<CUnigineSupport> *m_unigineSupport = MakeExternClass<CUnigineSupport>(); m_unigineSupport->addConstructor(); m_unigineSupport->addFunction("getworldLoad",&CUnigineSupport::getvalue); m_unigineSupport->addFunction("setworldLoad",&CUnigineSupport::setvalue); Interpreter::addExternClass("CUnigineSupport",m_unigineSupport); and trying to call from System script (Note: Class is exported before init engine called ) by:- int init() { CUnigineSupport extern_object = new CUnigineSupport(); int tempVal = extern_object.getvalue(); log.message("\nvalue is: %d",tempVal); return 1; } I am getting error as:- Interpreter::parse(): unknown token "CUnigineSupport" Am I missing something while exporting class. Thanks Link to comment
Recommended Posts