Workspaces
The main feature of Hats is to create workspaces. A workspace can be seen as similar to an Editor layout, but is much more powerful, thanks to a variety of rules that can trigger when the workspace is enabled.
Default workspace
When you first start Hats, a Default workspace is created and activated. This workspace has no rules, meaning that the Editor is not modified in any way.
When you remove an active workspace or something "bad" happens (i.e. the active workspace asset is deleted), Hats reverts to the Default workspace.
Create a workspace
Workspaces are personal, so each user on the project can have their own set. workspaces are represented by a ScriptableObject of type Workspace
.
To create one, simply right-click in the Project window and choose Create > Hats > Workspace.

Once created, you can modify its properties:

Notice that identifier, icon and colour are all important because they appear in the Workspace Switcher UI, and help you identify which workspace is active at the moment.
The rules list contains workspace rules that trigger when the workspace becomes active. Click on the plus button to explore available types (and read all about them in the Rules section).
Once the file is setup, it's time to enable it.
Sharing workspaces
Even though workspaces are personal, because they are assets they could be shared with the rest of the team. It's up to you and the team to decide whether workspaces are personal or shared.
If you want to keep them personal, you might want to save them all in a designated folder (for instance 📂 Assets/Settings/Hats/Workspaces
) and ignore that folder in your version control.
Enable workspaces
To assign a workspace to your list, go to Project Settings > Hats, and add it to the list of Personal Workspaces.

As you add workspaces, you will notice that they become available in the Switcher UI at the top (next to Active Workspace).
Once at least 1 workspace is added to the list, you can now switch between them.
To understand if or how a workspace is used, select it and look at the bottom of its Inspector. You will find a series of messaging detailing whether the Workspace is in use, or if it's associated to a Team:

Remove a workspace
To remove a workspace from the available ones, you do so in Project Settings > Hats. You just need to remove it from the list.
Removing a workspace from the list doesn't delete the asset. So you can safely remove workspaces to disable them, keep the asset, and re-enable them at a later point.
If you remove an active workspace, Hats automatically switches to the Default workspace.
Last updated