zanpei Posted April 22, 2011 Share Posted April 22, 2011 I has exported the engine in dll. and I created an ObjectMeshSkinned object, now I want to use this object in the script system. how should i do? our project is coding in C++,and all the engine is exported in dll.but the particle system is in script. and we want to bind an particle in an object then the problem happen. void EffectSprite::setParent(Node* node) //this is C++ code { Unigine::Engine* pInterface = Ungine::Engine::get(); pInterface->runSystem( "EffectSystem::setParent", Ungine::Variable(m_id), Ungine::Variable("Node", node)); //EffectSystem is a script piece } I debug to search the problem and find out that: in Variable class the setExternClassObject(), the pointer ::Interpreter::get() is NULL. How should I do to correct this problem Link to comment
frustum Posted April 24, 2011 Share Posted April 24, 2011 You should setup system script runtime by calling pushSystem()/popSystem() functions around Unigine::Variable("Node",node) constructor. https://developer.unigine.com/forum/topic/62-enginerunworld-and-uniginevariable-usage Link to comment
Recommended Posts