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

Method to_dict

unity_cli/hub/project.py:242–259  ·  view source on GitHub ↗

Convert to dictionary for JSON output.

(self)

Source from the content-addressed store, hash-verified

240 )
241
242 def to_dict(self) -> dict[str, Any]:
243 """Convert to dictionary for JSON output."""
244 return {
245 "path": str(self.path),
246 "unity_version": self.unity_version.version,
247 "unity_revision": self.unity_version.revision,
248 "product_name": self.settings.product_name,
249 "company_name": self.settings.company_name,
250 "version": self.settings.version,
251 "screen_size": {
252 "width": self.settings.default_screen_width,
253 "height": self.settings.default_screen_height,
254 },
255 "build_scenes": [{"path": s.path, "enabled": s.enabled} for s in self.build_settings.scenes],
256 "packages": [
257 {"name": p.name, "version": p.version, "local": p.is_local} for p in self.packages.dependencies
258 ],
259 }
260
261
262# =============================================================================

Callers 1

project_infoFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected