roberto.voxelfarm Posted August 23, 2019 Share Posted August 23, 2019 (edited) I create a plugin where I want to include a new 3d object. For my 3dObject I inherited from ObjectExternBase class My3dObject: public Unigine::ObjectExternBase { public: template <class> friend class Unigine::Ptr; static void release_ptr(My3dObject *p); { delete p; } static Unigine::Ptr<My3dObject> create(); { Unigine::Ptr<My3dObject> ptr = Unigine::Ptr<My3dObject>(new My3dObject()); return ptr; } virtual int getClassID() override; virtual int getNumSurfaces() override; virtual const char *getSurfaceName(int surface) override; virtual const ::Unigine::BoundBox &getBoundBox(int surface) override; virtual const ::Unigine::BoundSphere &getBoundSphere(int surface) override; virtual const ::Unigine::BoundBox& getBoundBox() override; virtual const ::Unigine::BoundSphere& getBoundSphere() override; ... int MyPlugin::init() { int id = Unigine::Interpreter::addGroup("MyGroup"); Unigine::ExternClass<My3dObject> *My3dObj = Unigine::MakeExternClass<My3dObject>(); Unigine::Interpreter::addExternClass("My3dObject", My3dObj, id); this->my3dObj = My3dObject::create(); this->my3dObj.get()->release(); Unigine::Editor::get()->addNode(this->my3dObj.get()->getNode(), true); ... After load the plugin in the "word tree" appear the node "ObjectExtern", but if I select this raise an exception Unhandled exception at 0x00007FF88046E91E (ucrtbase.dll) in Editor_x64d.exe: Fatal program exit requested. Exist some sample that show how I can add My3dObject to the editor from a plugin. /Roberto Edited August 23, 2019 by roberto.voxelfarm Link to comment
morbid Posted August 26, 2019 Share Posted August 26, 2019 Hello Roberto, At the moment Editor can't work with custom plugins. We're already developing this feature and plan to release it with SDK 2.10 (October 2019). Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts