8.4 – Multiple Roots

Attention : Multiple roots are in beta stage and only available after iGUI 1.2.4 and iGUIBasic 1.0.1

To create multiple roots follow these steps :

1) Create a scene.
2) Add a root.
3) Duplicate the root from hierarchy tab
4) Duplicate iGUICode_sceneName file
5) Change the file name to iGUICode_sceneName2 for example. Also change the class declaration, instance type and getInstance() return type to iGUICode_sceneName2.
6) Now drop the edited script file (iGUICode_sceneName2) to the “Manual code file” property of new root.

Now you’re ready to go. To edit gui elements, you have to enable only one root at a time and disable the ones which won’t be edited. You can enable/disable roots using the component checkbox (Please take a look at the figure right).