Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Runtime Workspace

About

Comprehensive module that allows to combine windows in one view with a grid management feature.
Encapsulates layouts size \ position management along with following of its predefined rules.

That system is fully dynamic and not demands predefinition of entire layout.

  • The layout can be created dynamically.
  • The layout supports layering with usage of VirtualHierarchyLinker features. That allows creation of complex sub layouts in depended on windows. Such layout will be embedded into virtual hierarchy and start follow common layout behavior.

Explore API: Doloro.UIEngine2.VirtualHierarchyLinker

Runtime Workspace Layout

RuntimeWorkspaceLayout is a main component that implements RWL features for in-game graphics element. The component derived from the AGUIElement class and integrates the object into the dui2 engine.

Explore API: Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout

By default, the component creates as undefined and must be configured.
RWL has 2 two global states that can be configured:

State Meaning
Intermediate layout A layout divided with a splitter that has some RWL instances as child (both standard Unity hierarchy or VirtualHierarchyLinker reflected).
Outer layout A layout that NOT divided with sub-layouts. Such layout reflects itself with a WorkspaceLayout with defined key and supposed to contain a content inside the scope.

Take a note that the RWL layout can be configured as you need and not demands you to follow a solid objects configuration, but still demands expected hierarchy to be implemented.

Virtual hierarchies

The system allows to embed layouts inside each other. Such layouts must be powered with a Window component as root AGUIElement. Any layout exists in local hierarchy and connects each other with virtual links.

Virtual connection could be provided by any outer (not divided) layout with applying of connected window via AWorkspaceProvider.ActiveContent property.


How to

Create divided layout

To create a layout divided on 2 zones you have to:

  1. Create a game object and add the RuntimeWorkspaceLayout component over it.
  2. Press Split button at Workspace configuration group at the component editor.
    1. Define split direction
    2. Define layout prefabs to instantiate. The component should offer you default options, but you may implement a custom view according with your GUI need and refer it here.
  3. Confirm split operation.
  4. Configure layout behavior options like a SplitType and Value to setup the backstage logic of RWL upscaling | downscaling.

In case the layout is already created but you want to refer it to some other root, follow the next instruction:

  1. Relocate layouts to refer toward child hierarchy of supposed root \ parent RuntimeWorkspaceLayout.
  2. Select the RuntimeWorkspaceLayout expected to be root or parent for referring layouts.
  3. Open Layout references group at the component editor.
    1. In case the object refers some layouts delete them and release they references into the fields of the group.
    2. Press Detect All button to auto detect objects among children or define references manually.
      Warning
      Make sure the layouts located in expected order: Left-Right for horizontally divided, Bottom-Top for vertically divided. Invalid order could cause critical GUI bugs.
      Every layout dividing only on two zones. To create a more complex layout you may split child layout to follow expected configuration.


Create outer layout

To create an outer layout that supports reflection of a Workspaces you have to create a game object with RuntimeWorkspaceLayout component, but without child RWL instances referenced within Layout references group.

Such RWL must has a defined workspace key. The component will automatically create a WorkspaceLayout with selected key and bond it with the layout instance.

Any Workspace GUI Element spawned within RWL scope will be associated with the declared WorkspaceLayout.


Load window to grid from resources

The module encapsulates Window resources loading to RWL layouts by BondWindowFromResources component using.

To load the window, it must be located at the Resources folder and has added Dynamic Resource component over it.

  1. Add BondWindowFromResources component on the object with outer RuntimeWorkspaceLayout component.
  2. Define the signature of window resource with defied DynamicResource component.

The window will be loaded after Start handler as soon as the resource will be loaded by background services.
Such a window will be connected to virtual hierarchy chain and will follow that parental layout events.


Examples

Templates

The package supplies you with pre-configurated resources using all along with module features.
The resources located under following path:
Doloro-GDK \ Doloro-UI-2 \ Resources \ Templates

You may reconfigure them along with you layout requirements to apply as default to use.

Templates

The package provides you with library of demo scenes and results by following path:
Doloro-GDK \ Doloro-UI-2 \ Scenes.
You may find collection of complex layouts configured to demonstrate you a flexibility and required setting to achieve any option.


Addons

Window Auto Size

Some of Window instances located at the same RWL scope may have some clamp options that affects entire layout behavior. It's not an issue when you are working with predictable layouts, but in cases of complex virtual hierarchies the clamp values can be undefined during development.

To make the development process simplified the package supplies you with the WindowAutoSizeClamp component that tracks complex changes of layout settings and reconfigures assigned Window along with settings of child layouts' settings.

A utility component that allows to compute the Window min and max sized along with content in auto mode, encapsulating entire process from developer.

Explore API: Doloro.UIEngine2.Modules.RuntimeWorkspace.WindowAutoSizeClamp


Limits

Warning
An utility considers that entire hierarchy including virtual one built with using of RuntimeWorkspaceLayout module and not using some custom layouts derived directly from the AClampedWorkspaceProvider.


How to use

  1. Add WindowAutoSizeClamp component on the game object with applied Window derived component.
  2. The component automatically recalculate entire layout in first LateUpdate call.

You can call manual update of layout with WindowAutoSizeClamp.Recopute() handler in case the layout has been changed without notification of entire hierarchy.