MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / from_path

Method from_path

unity_cli/hub/project.py:224–240  ·  view source on GitHub ↗

Gather all project information from files.

(cls, project_path: Path)

Source from the content-addressed store, hash-verified

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."""

Callers 1

project_infoFunction · 0.80

Calls 3

ProjectErrorClass · 0.90
is_unity_projectFunction · 0.85
from_fileMethod · 0.45

Tested by

no test coverage detected