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

Method find

unity_cli/api/gameobject.py:17–36  ·  view source on GitHub ↗

Find GameObject(s) by name or instance ID. Args: name: GameObject name to search for instance_id: Instance ID to search for Returns: Dictionary with found GameObjects

(
        self,
        name: str | None = None,
        instance_id: int | None = None,
    )

Source from the content-addressed store, hash-verified

15 self._conn = conn
16
17 def find(
18 self,
19 name: str | None = None,
20 instance_id: int | None = None,
21 ) -> dict[str, Any]:
22 """Find GameObject(s) by name or instance ID.
23
24 Args:
25 name: GameObject name to search for
26 instance_id: Instance ID to search for
27
28 Returns:
29 Dictionary with found GameObjects
30 """
31 params: dict[str, Any] = {"action": "find"}
32 if name:
33 params["name"] = name
34 if instance_id is not None:
35 params["id"] = instance_id
36 return self._conn.send_request("gameobject", params)
37
38 def create(
39 self,

Calls 1

send_requestMethod · 0.80