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

Method load

unity_cli/api/scene.py:51–72  ·  view source on GitHub ↗

Load scene. Args: name: Scene name to load path: Scene path to load (e.g., "Assets/Scenes/Main.unity") additive: Load scene additively Returns: Dictionary with operation result

(
        self,
        name: str | None = None,
        path: str | None = None,
        additive: bool = False,
    )

Source from the content-addressed store, hash-verified

49 )
50
51 def load(
52 self,
53 name: str | None = None,
54 path: str | None = None,
55 additive: bool = False,
56 ) -> dict[str, Any]:
57 """Load scene.
58
59 Args:
60 name: Scene name to load
61 path: Scene path to load (e.g., "Assets/Scenes/Main.unity")
62 additive: Load scene additively
63
64 Returns:
65 Dictionary with operation result
66 """
67 params: dict[str, Any] = {"action": "load", "additive": additive}
68 if name:
69 params["name"] = name
70 if path:
71 params["path"] = path
72 return self._conn.send_request("scene", params)
73
74 def save(self, path: str | None = None) -> dict[str, Any]:
75 """Save current scene.

Callers 13

test_load_by_nameMethod · 0.45
test_load_by_pathMethod · 0.45
test_load_additiveMethod · 0.45
test_delete_existingMethod · 0.45
mainFunction · 0.45
scene_loadFunction · 0.45
read_status_fileFunction · 0.45

Calls 1

send_requestMethod · 0.80