prototype
MAmattpocock/skills336k近 7 天新增 5,004 个 star
Show which view the Game tab is showing, switch it between the Game view and the Device Simulator (rotating the simulated device to match the Game view's orientation), or pick the simulated device by name. Use before Play when the UI must be checked in a device frame.
Show which view the Game tab is showing, switch it between the Game view and the Device Simulator (rotating the simulated device to match the Game view's orientation), or pick the simulated device by name.
uloop game-view-mode [--to <GameView|Simulator>] [--device <name>] [--list-devices]
| Parameter | Type | Default | Description |
|---|---|---|---|
--to | string | unset | Simulator switches the current Game view tab to the Device Simulator in place and rotates the device to match the Game view (landscape or portrait) when Player Settings allow that orientation; GameView switches back. Omit to report the current view without changing it. |
--device | string | unset | Shows the named device in the Device Simulator and implies --to Simulator when --to is omitted. Case-insensitive: a whole name wins, then a name ending in the given words (iPhone 12 picks Apple iPhone 12, not Apple iPhone 12 mini), then any name containing them. Several matches or none: nothing changes, Success is false, and AvailableDevices lists the candidates or every device. |
--list-devices | flag | - | Adds AvailableDevices, the names of every device the Simulator can show, to the response. |
Returns JSON containing:
Success: false when the Device Simulator is not available, when --device matches several devices or none, or when --device is combined with --to GameView. Nothing changes in those cases.PreviousView: View before the request: GameView, Simulator, None (no Play Mode view open), or Other (a third-party Play Mode view).View: View after the request, same values.Changed: Whether the tab was swapped, a view was opened, or the shown device changed.SimulatorOrientation: Orientation the Simulator renders (Portrait, PortraitUpsideDown, LandscapeLeft, LandscapeRight). Present only when the current view is the Simulator.Device: Name of the device the Simulator shows. Present when the request succeeded and the current view is the Simulator.AvailableDevices: Device names. Present with --list-devices, and when --device matched several devices (the candidates) or none (every device).Message: Human-readable status.Warning: Present when the device was not rotated or the Simulator renders a different orientation than requested.# Report which view is showing
uloop game-view-mode
# Play in the Device Simulator, rotated like the Game view
uloop game-view-mode --to Simulator
uloop control-play-mode --action Play
# Show a particular device (implies --to Simulator)
uloop game-view-mode --device "iPhone 12"
# Which devices can be shown?
uloop game-view-mode --list-devices
# Back to the plain Game view
uloop game-view-mode --to GameView
--device names another one.Changed is false. With --device, only the device changes.set-game-view-size first when the shape must be exact.Warning says so. Fix the Default Orientation or the allowed auto-rotation flags in Player Settings if landscape is really wanted.Apple iPhone 12, Google Pixel 5, ...); Unity 6 ships generic ones (iOS Notch Device (1170x2532), Tablet Small (1536x2048), ...) and real names need the Device Simulator Devices package. When unsure, run --list-devices first.control-play-mode separately.Success: false and leave the view untouched.MAmattpocock/skills336k近 7 天新增 5,004 个 star
AFaffaan-m/ECC314k近 7 天新增 4,125 个 star
FIfirecrawl/firecrawl214k近 7 天新增 5,821 个 star
ANanthropics/skills203k近 7 天新增 3,333 个 star
用 React、Tailwind 和 shadcn/ui 构建多组件页面。
ANanthropics/skills203k近 7 天新增 3,333 个 star