Gather all project information from files.
(cls, project_path: Path)
| 222 | |
| 223 | @classmethod |
| 224 | def from_path(cls, project_path: Path) -> ProjectInfo: |
| 225 | """Gather all project information from files.""" |
| 226 | project_path = project_path.resolve() |
| 227 | |
| 228 | if not is_unity_project(project_path): |
| 229 | raise ProjectError( |
| 230 | f"Not a valid Unity project: {project_path}", |
| 231 | code="INVALID_PROJECT", |
| 232 | ) |
| 233 | |
| 234 | return cls( |
| 235 | path=project_path, |
| 236 | unity_version=ProjectVersion.from_file(project_path), |
| 237 | settings=ProjectSettings.from_file(project_path), |
| 238 | build_settings=BuildSettings.from_file(project_path), |
| 239 | packages=PackageManifest.from_file(project_path), |
| 240 | ) |
| 241 | |
| 242 | def to_dict(self) -> dict[str, Any]: |
| 243 | """Convert to dictionary for JSON output.""" |
no test coverage detected