ParagonPaths
Static path registry providing strongly-typed access to all standard workspace, project, and asset folder paths. Uses a nested Folder class hierarchy with implicit string conversion for seamless use in file I/O operations.
Definition
Namespace: Paragon Assembly: Paragon.dll
[RuntimeInitializeOnLoad]
public static class ParagonPathsAttributes: [RuntimeInitializeOnLoad], [InitializeOnLoad] (Editor)
Remarks
ParagonPaths is the single source of truth for file system paths in the Paragon framework. Rather than scattering string literals like "Assets/Paragon/Core" throughout the codebase, all paths are accessed through a strongly-typed Folder hierarchy that mirrors the project's directory structure.
Initialization
The class is marked with [RuntimeInitializeOnLoad] (Paragon's custom attribute), which forces its static constructor to run at application startup. In the Editor, [InitializeOnLoad] provides the same guarantee. The static constructor:
Detects the OS platform (Unix vs Windows)
Resolves the user's Documents folder
Builds the full folder hierarchy:
Documents/Paragon Entertainment/[ProjectName]/...
Folder Hierarchy
Implicit String Conversion
Every Folder instance implicitly converts to string, so paths can be passed directly to any API expecting a path string:
Quick Lookup
Get workspace root
ParagonPaths.Workspace
Get project root
ParagonPaths.Project
Get Assets folder
ParagonPaths.Assets
Get Paragon Core folder
ParagonPaths.Assets.Paragon.Core
Get Paragon Editor folder
ParagonPaths.Assets.Paragon.Editor
Get Build/Resources
ParagonPaths.Assets.Build.Resources
Get game-specific folder
ParagonPaths.Assets.Game
Combine with child path
ParagonPaths.Assets.Combine("MyFolder/file.txt")
Get full system path
ParagonPaths.Project.GetFullPath()
Get folder name only
ParagonPaths.Assets.GetFolderName() → "Assets"
Properties
Workspace
WorkspaceFolder
public static
Root workspace folder (Documents/Paragon Entertainment)
Project
ProjectFolder
public static
Project root (workspace + project directory name)
Assets
AssetsFolder
public static
Unity Assets folder
Nested Classes
Folder
Base class for all folder types. Stores a path string and provides utility methods.
path
string
Protected path string
Folder(string name)
Constructor
Creates from a name (relative path)
Folder(string directory, string name)
Constructor
Creates from parent directory + name
implicit operator string
Operator
Returns the path string
GetFolderName()
string
Returns just the folder name
GetFullPath()
string
Returns the absolute path
Combine(string childPath)
string
Joins with a child path
ToString()
string
Returns the path string
WorkspaceFolder : Folder
Project
ProjectFolder
The project folder within this workspace
ProjectFolder : Folder
Assets
AssetsFolder
Unity Assets folder
Packages
Folder
Unity Packages folder
Build
Folder
Build output folder
ThirdParty
Folder
Third-party dependencies
ProjectSettings
Folder
Unity ProjectSettings
Library
Folder
Unity Library (cache)
Temp
Folder
Unity Temp folder
AssetsFolder : Folder
Paragon
ParagonFolder
Assets/Paragon folder
Build
BuildFolder
Assets/Build folder
ThirdParty
Folder
Assets/Third-Party folder
Game
Folder
Assets/[ProductName] folder (uses Application.productName)
ParagonFolder : Folder
Core
Folder
Assets/Paragon/Core
Editor
Folder
Assets/Paragon/Editor
BuildFolder : Folder
Resources
Folder
Assets/Build/Resources
Common Pitfalls
Cross-platform path resolution On Unix/macOS, the Documents path is resolved as $HOME/Documents. On Windows, it uses Environment.SpecialFolder.MyDocuments. Paths use System.IO.Path.Combine for correct separators, but be aware of platform differences when logging or comparing paths.
Workspace name is hardcoded The workspace folder name is the constant "Paragon Entertainment". If the workspace directory is renamed, ParagonPaths will point to a nonexistent folder.
Game folder uses Application.productName AssetsFolder.Game is initialized with Application.productName, which is set in Unity's Player Settings. If the product name changes, the path changes accordingly.
Folders do not create directories The Folder class only stores path strings — it does not create physical directories. Ensure directories exist before writing files to paths obtained from ParagonPaths.
Examples
Accessing Common Paths
Combining Paths
Using in File Operations
See Also
RuntimeInitializeOnLoad — attribute that triggers static constructor execution
Utility Overview — system overview
Last updated