karim.salama Posted November 17, 2021 Share Posted November 17, 2021 Hi, In the old editor (implemented in UnigineScript), there was an array called Nodes::nodes which contained all the currently selected nodes. Is there anything like that in the new editor? Thanks in advance Link to comment
victor Posted November 17, 2021 Share Posted November 17, 2021 Hello Karim, Yes, Editor's API has such a functionality. This function does what you want: #include <editor/Selection.h> #include <editor/Selector.h> using namespace Unigine; Vector<NodePtr> getSelectedNodes() { Vector<NodePtr> result; if (Editor::SelectorNodes *snodes = Editor::Selection::getSelectorNodes()) { result = snodes->getNodes(); } return result; } 2 Link to comment
karim.salama Posted November 17, 2021 Author Share Posted November 17, 2021 @victor Thank you. I hope this will be well documented when Unigine 2.15 gets released. Link to comment
Recommended Posts