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,
)
| 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. |