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

Method _get_unity_version_safe

unity_cli/api/dynamic_api.py:90–100  ·  view source on GitHub ↗

Get Unity version from connected instance, or None.

(self)

Source from the content-addressed store, hash-verified

88 return self._filter_schema(full, namespace, type_name, method_name, limit, offset)
89
90 def _get_unity_version_safe(self) -> str | None:
91 """Get Unity version from connected instance, or None."""
92 try:
93 instances = self._conn.list_instances()
94 for inst in instances:
95 if inst.get("unity_version"):
96 version: str = inst["unity_version"]
97 return version
98 except Exception:
99 pass
100 return None
101
102 def _filter_schema(
103 self,

Callers 1

schemaMethod · 0.95

Calls 2

list_instancesMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected