aargh Posted February 19, 2015 Share Posted February 19, 2015 Hi I have an external class (defined on c++ side). For example class Foo : public Base { public: Foo() { Log::warning("Foo::Foo(): called\n"); } ~Foo() { Log::warning("Foo::~Foo(): called\n"); } }; And another class defined on Unigine script side. TIhis is subclass of Foo. class Bar : Foo { Bar() : Foo() { log.message("Bar called\n"); } void info() { log.message("info called\n"); } } Bar makeClass() { Bar b = new Bar(); return b.extern; } Class Foo is defined as extern on c++ side using MakeExternClass function. And now my stupid question. Is any way to call method "info" from c++ side ? Class Bar is created by calling from c++ Engine *e = Engine::get(); Variable ret = e->runWorldFunction(Variable("makeClass")); Code is simplified, no errors etc. Link to comment
unclebob Posted February 23, 2015 Share Posted February 23, 2015 Hello, Jiri! It's not possible to call UserClass (class which was declared in UnigineScript) method on C++ side unfortunately. Link to comment
aargh Posted February 24, 2015 Author Share Posted February 24, 2015 Hmm bad news :-( I`ll try it a diferent way. thank you Link to comment
Recommended Posts