Simon.Anderson Posted February 23, 2015 Share Posted February 23, 2015 Hi there, Does anyone know how to show the scene tree view hierachy at runtime in an application? Is there a special command for this? Also we're looking into creating our own tree view control in order to enable the user/player to switch groups of objects on/off while running the application. Has anyone had experience with this? Would it be possible to use the unigine object tree view unigine provides with the sdk editor somehow? Any help appreciated. Cheers, Simon Link to comment
unclebob Posted February 23, 2015 Share Posted February 23, 2015 Hi there, Simon! You can load editor (by using "editor_load" console command) any time during your application run and use Nodes window. If you want to see node tree without editor logic then you have to create your tree view instance in your world script and add the nodes you want to manage. Consider using WidgetTreeBox: https://developer.unigine.com/en/docs/1.0/scripting/library/gui/class.widgettreebox Link to comment
Simon.Anderson Posted February 24, 2015 Author Share Posted February 24, 2015 Ok thanks, as far as the WidgetTreeBox goes is there any way to add a checkbox to each item in the tree and make it selectable and add a right-click context menu to each item? If not are we able to extend to api to be able to do this? Link to comment
unclebob Posted February 24, 2015 Share Posted February 24, 2015 WidgetTreeBox can manage only tree hierarchy, but here's the trick: you can use WidgetCheckBox with GUI_ALIGN_OVERLAP alignment flag in order to place them to any place you want. That means you have to manage their layout and visibility but it should do the job. Link to comment
Recommended Posts