Expand description
Unity Solution Generator core library.
Ported from the Swift SolutionGeneratorCore target.
Re-exports§
pub use defines::generate_version_defines;pub use defines::parse_scripting_defines;pub use error::GeneratorError;pub use error::LockfileError;pub use error::Result;pub use lockfile::DllRef;pub use lockfile::Lockfile;pub use lockfile::LockfileIO;pub use lockfile::RefCategory;pub use lockfile_scanner::LockfileScanner;pub use paths::DEFAULT_GENERATOR_ROOT;pub use paths::lockfile_path;pub use paths::parent_directory;pub use paths::resolve_project_root;pub use paths::resolve_real_path;pub use project_scanner::AsmDefRecord;pub use project_scanner::ProjectCategory;pub use project_scanner::ProjectScanner;pub use project_scanner::ScanResult;pub use project_scanner::VersionDefine;pub use solution_generator::BuildConfig;pub use solution_generator::BuildPlatform;pub use solution_generator::GenerateOptions;pub use solution_generator::GenerateResult;pub use solution_generator::SolutionGenerator;pub use typecheck::TypecheckOptions;pub use typecheck::TypecheckResult;
Modules§
- defines
- error
- io
- lockfile
- lockfile_
scanner - Lockfile scanner: walks the Unity installation + project to materialise
every DLL reference, analyzer, and define needed for a
.csproj. - paths
- profile
- Per-section profiling. Default-off; opt in by setting
USG_PROFILE=1(concise) orUSG_PROFILE=full(verbose, includes child spans). Backed bytracingso external collectors (tracing-tracy,tracing-flame, etc.) can also consume it. - project_
scanner - Project-side filesystem scanner.
- solution_
generator - Renders
.csproj/.sln/Directory.Build.propsfor a platform+config variant. Single entry point driven bycsproj.lock. - typecheck
typechecksubcommand — validate compile via directcsc.dllinvocation, bypassing MSBuild entirely. See [[architecture.md]] (Typecheck subsystem).- xml
Macros§
- section
- Open a profiling section. Equivalent to
tracing::info_span!(...).entered(), but named for clarity at the call site.
Constants§
- CACHE_
VERSION - Version of the dev-local cache files (
scan-cache,lock-fingerprint,.fingerprints/<hash>). Bumping invalidates ALL three caches wholesale — no migrations. These files are gitignored underLibrary/, so cold-rebuild on bump is harmless. Cargo / Bazel idiom. - LOCKFILE_
VERSION - Version of the user-visible
csproj.lockformat. Bump only on intentional schema changes;csproj.lockmay be checked in, so a bump means consumers re-lock against possibly different Unity installs. See [[architecture.md]].
Functions§
- generate
- High-level convenience: parse string args + run the full generate pipeline.