Hello,
I’d like to use UIToolkit to design high-level layout, meaning defined areas and then put classic UGUI prefab inside those areas. Point is that I’d like to be able to create specific “layouts” for mobile and tabs which would have the same areas but with different sizes and properties and then load the right one at runtime and then add prefabs in the right areas.
Is that possible ? Does that makes sense ?
Thanks.
In 2020.2, integration with uGUI is difficult as UIToolkit windows are always rendered on top of uGui, interleaving uGUI and UITK will be supported in 2021. However, if all the elements are transparent and set to ignore clicks, I guess they could be used for layout information. You will need to wait for the layout calculations to be done, either by waiting until the LateUpdate or by registering to GeometryChanged Events, then translate the layout rects from UITK, top-left(0,0) layout coordinates to uGUI Rect Transform values.
Ok. It’s a bit “tricky” and definitively does not sound like a safe way to go. But now it’s all clear.
Thanks !