EngineModule
Represents a single mountable engine module — a shared Plastic SCM repository that can be linked into the current project workspace via xlink or symlink. Tracks the module's repository, workspace, mount path, target path, and current mount state.
Definition
Namespace: Paragon.Editor.ModuleManager Assembly: Paragon.Editor.dll
[Serializable]
internal class EngineModuleRemarks
An EngineModule acts as the bridge between a Plastic SCM Repository and the project workspace. It stores the configuration for where in the project a module should be mounted (MountPath) and what part of the module's workspace to link (TargetPath).
Mount Strategies
NONE
Not mounted
Module is registered but not linked
XLINK
Plastic SCM cross-repository link
Production — pinned to a specific changeset, read-only
SYMLINK
Filesystem symbolic link
Development — live editing of the linked repository
Mounting Process
When Mount() is called:
If already mounted with a different state, the existing link is removed first
For
XLINK: resolves the target changeset and creates an xlink via the project workspaceFor
SYMLINK: creates a filesystem symlink from the target path to the mount pathWraps the operation in
AssetDatabase.StartAssetEditing/StopAssetEditingwith progress barsTriggers
AssetDatabase.Refresh()andEditorUtility.RequestScriptReload()on completion
Initialization
Initialize() resolves the Repository and Workspace from serialized names via the PlasticSCM static API.
Quick Lookup
Check if mounted
module.IsMounted
Get mount type
module.GetMountState()
Mount as xlink
module.Mount(MountState.XLINK)
Mount as symlink
module.Mount(MountState.SYMLINK)
Unmount
module.Mount(MountState.NONE)
Set mount path
module.SetMountPath("/Assets/Paragon/Core")
Set target path
module.SetTargetPath("/Core")
Get full mount path
module.GetFullMountPath()
Get target branch
module.GetTargetBranch()
Get target changeset
module.GetTargetChangeset()
Switch workspace
module.SwitchWorkspace(workspace)
Properties
Repository
Repository
public
The Plastic SCM repository this module references
Workspace
Workspace
public
The workspace within the repository (may be null)
Name
string
public
Module name (same as repository name)
MountPath
string
public
Path within the project where the module is mounted (e.g., /Assets/Paragon/Core)
TargetPath
string
public
Path within the module's workspace to link (e.g., /Core)
IsMounted
bool
public
true if mount state is XLINK or SYMLINK
Fields
repositoryName
string
[SerializeField]
Serialized repository name for persistence
workspaceName
string
[SerializeField]
Serialized workspace name for persistence
mountPath
string
[SerializeField]
Serialized mount path
targetPath
string
[SerializeField]
Serialized target path
Constructors
EngineModule(string)
Creates a module for the named repository with empty mount and target paths.
Methods
Initialize
Resolves the Repository and Workspace from serialized names via PlasticSCM.
Mount
Mounts or unmounts the module with the specified strategy. If already mounted differently, unmounts first.
mountState
MountState
The desired mount state (NONE, XLINK, or SYMLINK)
GetMountState
Returns the current mount state by checking for xlinks and symlinks.
GetTargetChangeset / GetTargetBranch
Returns the changeset or branch the module is targeting. If mounted via xlink, reads from the xlink metadata; otherwise, reads the workspace's current state.
SetMountPath / SetTargetPath
Configures the mount and target paths.
GetFullMountPath / GetFullTargetPath
Returns absolute filesystem paths by combining with the project/workspace root.
SwitchWorkspace
Changes the workspace used by this module.
GetXlink
Returns the Plastic SCM xlink at the mount path, or null if none exists.
Common Pitfalls
Mount paths start with / Mount and target paths use a leading / that is stripped (via [1..]) when constructing full filesystem paths. If you pass a path without a leading /, the substring operation will drop the first character.
Mounting triggers script reload Mount() calls EditorUtility.RequestScriptReload() after mounting, which causes a domain reload. Any in-memory state not persisted will be lost.
Initialize must be called before use The Repository and Workspace properties are null until Initialize() is called. The EngineModuleManager calls this automatically for all registered modules.
See Also
EngineModuleManager — creates and manages modules
EngineModuleSettings — persists module configuration
PlasticSCM — resolves repositories and workspaces
ModuleManager Overview — system overview
Last updated