Quantum 3 3.1.0

Classes | Static Public Member Functions | Static Public Attributes | Properties | List of all members
Quantum.Editor.QuantumDocumentation Class Reference

Installs, updates and uninstalls a local copy of the SDK documentation (md files for AI agents) into FolderPath. The editor hub widget is a UI on top of this class, automation can call it directly. SDKs configure the sources by implementing GetSettingsUser. More...

Classes

struct  Settings
 Documentation installation settings, the defaults can be changed by implementing GetSettingsUser. More...
 

Static Public Member Functions

static string FormatAgentPrompt ()
 Formats a prompt for an AI agent that links the agent guide in the agent file (AGENTS.md, CLAUDE.md) of the repository. The prompt links the guide relative to the Unity project, the agent rewrites the path relative to the agent file. The text comes from Settings.AgentPrompt. More...
 
static string GetAvailableVersion (QuantumDocumentationSource source)
 Returns the version available from the source, null when unknown. The online version cannot be queried and is always null. More...
 
static string GetInstalledVersion ()
 Returns the installed documentation version (e.g. "2026-08-14"), null when not installed. More...
 
static bool HasSource (QuantumDocumentationSource source)
 Returns true when the source is available (online url set, package folder or archive asset found). More...
 
static void Install ()
 Installs or updates the documentation without user interaction, e.g. with -executeMethod Quantum.Editor.QuantumDocumentation.Install. Tries the documentation shipped with the SDK, then the online download, the errors of each attempt are logged. Finally logs the folder and the prompt for an AI agent to link the documentation in the agent file (AGENTS.md, CLAUDE.md), see FormatAgentPrompt. No other method of this class may be named Install, -executeMethod looks the method up by name only and rejects methods with parameters. More...
 
static bool InstallFrom (QuantumDocumentationSource source)
 Installs or updates the documentation from the source and blocks until finished. Registry and git UPM installs also copy the agent files, see CopyAgentFiles. Then deletes the installations in the other locations, see DeleteInstallations. Only deletes the installations when IsProvidedByPackage. More...
 
static bool IsInstalled ()
 Returns true when the documentation is in FolderPath. More...
 
static bool Uninstall ()
 Deletes the documentation in all install locations, see DeleteInstallations. The documentation folder of a package is never deleted, see IsProvidedByPackage. More...
 

Static Public Attributes

const string ClaudeFileName = "CLAUDE.md"
 Name of the optional Claude Code agent file next to the agent guide, UPM installs copy it together with the guide. More...
 
static string FolderPath => IsProvidedByPackage ? GetPackageFolderPath() : Path.GetFullPath(Path.Combine(ProjectRootPath, InstallFolder))
 The absolute path of the documentation folder: the package folder when IsProvidedByPackage, otherwise Settings.UpmFolder with UPM and Settings.AssetFolder without UPM. More...
 
const string IndexFileName = "index.md"
 Name of the index file inside the documentation folder. More...
 
const string VersionFileName = "version.txt"
 Name of the version file inside the documentation folder. More...
 

Properties

static Settings CurrentSettings [get]
 The settings after applying GetSettingsUser. More...
 
static bool IsProvidedByPackage [get]
 True when the SDK is a local or embedded UPM package that ships the documentation folder. The package path is stable and writable by the user, so the documentation is used in place: FolderPath points into the package, install and uninstall only delete previous installs, see DeleteInstallations. More...
 

Detailed Description

Installs, updates and uninstalls a local copy of the SDK documentation (md files for AI agents) into FolderPath. The editor hub widget is a UI on top of this class, automation can call it directly. SDKs configure the sources by implementing GetSettingsUser.

Member Function Documentation

◆ IsInstalled()

static bool Quantum.Editor.QuantumDocumentation.IsInstalled ( )
inlinestatic

Returns true when the documentation is in FolderPath.

◆ GetInstalledVersion()

static string Quantum.Editor.QuantumDocumentation.GetInstalledVersion ( )
inlinestatic

Returns the installed documentation version (e.g. "2026-08-14"), null when not installed.

◆ HasSource()

static bool Quantum.Editor.QuantumDocumentation.HasSource ( QuantumDocumentationSource  source)
inlinestatic

Returns true when the source is available (online url set, package folder or archive asset found).

◆ GetAvailableVersion()

static string Quantum.Editor.QuantumDocumentation.GetAvailableVersion ( QuantumDocumentationSource  source)
inlinestatic

Returns the version available from the source, null when unknown. The online version cannot be queried and is always null.

◆ InstallFrom()

static bool Quantum.Editor.QuantumDocumentation.InstallFrom ( QuantumDocumentationSource  source)
inlinestatic

Installs or updates the documentation from the source and blocks until finished. Registry and git UPM installs also copy the agent files, see CopyAgentFiles. Then deletes the installations in the other locations, see DeleteInstallations. Only deletes the installations when IsProvidedByPackage.

Returns
True when the documentation is installed.

◆ Install()

static void Quantum.Editor.QuantumDocumentation.Install ( )
inlinestatic

Installs or updates the documentation without user interaction, e.g. with -executeMethod Quantum.Editor.QuantumDocumentation.Install. Tries the documentation shipped with the SDK, then the online download, the errors of each attempt are logged. Finally logs the folder and the prompt for an AI agent to link the documentation in the agent file (AGENTS.md, CLAUDE.md), see FormatAgentPrompt. No other method of this class may be named Install, -executeMethod looks the method up by name only and rejects methods with parameters.

Exceptions
InvalidOperationExceptionNo source could be installed, fails a batch mode run.

◆ Uninstall()

static bool Quantum.Editor.QuantumDocumentation.Uninstall ( )
inlinestatic

Deletes the documentation in all install locations, see DeleteInstallations. The documentation folder of a package is never deleted, see IsProvidedByPackage.

Returns
False when a file or folder could not be deleted.

◆ FormatAgentPrompt()

static string Quantum.Editor.QuantumDocumentation.FormatAgentPrompt ( )
inlinestatic

Formats a prompt for an AI agent that links the agent guide in the agent file (AGENTS.md, CLAUDE.md) of the repository. The prompt links the guide relative to the Unity project, the agent rewrites the path relative to the agent file. The text comes from Settings.AgentPrompt.

Member Data Documentation

◆ VersionFileName

const string Quantum.Editor.QuantumDocumentation.VersionFileName = "version.txt"
static

Name of the version file inside the documentation folder.

◆ IndexFileName

const string Quantum.Editor.QuantumDocumentation.IndexFileName = "index.md"
static

Name of the index file inside the documentation folder.

◆ ClaudeFileName

const string Quantum.Editor.QuantumDocumentation.ClaudeFileName = "CLAUDE.md"
static

Name of the optional Claude Code agent file next to the agent guide, UPM installs copy it together with the guide.

◆ FolderPath

string Quantum.Editor.QuantumDocumentation.FolderPath => IsProvidedByPackage ? GetPackageFolderPath() : Path.GetFullPath(Path.Combine(ProjectRootPath, InstallFolder))
static

The absolute path of the documentation folder: the package folder when IsProvidedByPackage, otherwise Settings.UpmFolder with UPM and Settings.AssetFolder without UPM.

Property Documentation

◆ CurrentSettings

Settings Quantum.Editor.QuantumDocumentation.CurrentSettings
staticget

The settings after applying GetSettingsUser.

◆ IsProvidedByPackage

bool Quantum.Editor.QuantumDocumentation.IsProvidedByPackage
staticget

True when the SDK is a local or embedded UPM package that ships the documentation folder. The package path is stable and writable by the user, so the documentation is used in place: FolderPath points into the package, install and uninstall only delete previous installs, see DeleteInstallations.