Jump to content

Consutrcting by String name with arguments


photo

Recommended Posts

Hello,

 

string className = "Unigine::CombinerAdd";
Unigine::CombinerAdd combiner = new (className);

// combiner.combiner_init(mesh);

 

The CombinerAdd constructor can also take a mesh object. How can I specify arguments when constructing using this syntax? In the meantime, I am manually calling the combiner_init(mesh) to initialize the object.

Link to comment
  • 2 weeks later...
class NodeWrapper {
Node node;

NodeWrapper(Node n) {
	node = n;   
}
~NodeWrapper() {
}
};


string type = "NodeWrapper";
Node n = engine.editor.getNode(engine.editor.findNode("box"));

NodeWrapper wrapper = new(type,n);

Link to comment
×
×
  • Create New...