Component:Workspace

From Resonite Wiki
Revision as of 16:22, 20 October 2024 by 989onan (talk | contribs) (change info)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Component image 
Workspace component as seen in the Scene Inspector


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


This component works in Userspace only, so a lot of it's features and potential is locked behind this. This is only used for saving the dash at the moment

Workspace is a component that allows for doing work inside of a containerized slot, where the user can add or remove items which gets saved every interval specified. These workspaces can be public or private, and work similarly in concept to Cloud Variables except greatly simplified and store an entire hierarchy instead of a single value. Workspaces have a path to them, which allow for having multiple different workspaces per user. Workspaces take up storage as a saved item would, and automatically synchronize in real time. Multiple users working on workspaces at the same time can cause issues however, since workspaces save their changes before loading from the cloud unless ReadOnly is enabled.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
User direct UserRef The user to manage reading and writing the contents of this workspace to the cloud for.
OverrideOwnerId String The override for the owner of this workspace to read and write the data for, which allows for reading public workspaces from others.
WorkspacePath String The path of the workspace on the Cloud. Adding "public/" (case ignored) to the start of the path allows for public workspaces anyone can edit. Public workspaces must exist first before another user than the owner can save to them.
InitializeWorkspace Action`1<Slot> A Sync Delegate to call that takes a slot for when this component generates the work space. the slot is the slot this component is on.
ReadOnly Bool Whether to only read the contents of this workspace from the cloud and not save it.
AutosaveDelay Float How long to wait between save attempts before trying to save again. saves only happen if there have been changes.
SuspendUpdates Bool Whether to pause the loading and saving of this workspace to the cloud.
_unsavedChanges Bool Whether this workspace has changes that should be saved to the cloud upon the next save.
_lastModification direct SyncTime The last time the workspace was changed.

Behavior

Examples

  • This can be useful for users who want to work on the same thing, at different times.
  • This can also be useful for keeping an object syncronized across multiple areas in a game, since it will load the same object into multiple different locations automatically.

See Also