Editor bridge toolset for Movie Maker. It defines MCP tool wrappers to list .movie assets, add a MoviePlayer component to a GameObject, and start/stop playback with options like looping, time scale, seek and rewind.
// AUTO-GENERATED by scripts/emit-mcp-wrappers.mjs — DO NOT EDIT.
// Regenerate: node scripts/extract-manifest.mjs && node scripts/emit-mcp-wrappers.mjs
// Source of truth: sbox-mcp-server/src/tools/ (zod schemas) → scripts/tools-manifest.json
using System.Text.Json.Nodes;
using System.Threading.Tasks;
using Editor.Mcp;
/// <summary>
/// Wire and control Sandbox.MovieMaker cutscene playback: list .movie clips, add MoviePlayer
/// components, play and stop clips.
/// </summary>
[McpToolset( "bridge_moviemaker", "Wire and control Sandbox.MovieMaker cutscene playback: list .movie clips, add MoviePlayer components, play and stop clips." )]
public static class BridgeMovieMakerTools
{
/// <summary>
/// Add a Sandbox.MovieMaker.MoviePlayer component and optionally wire a .movie resource into it —
/// the cutscene playback primitive. Creates a new 'Movie Player' GameObject when no id is given.
/// Set playOnStart to begin playback the moment play mode starts (intro cinematics), or leave it
/// and trigger via play_movie (scripted cutscenes — call it from a trigger zone or dialogue beat).
/// isLooping + timeScale map straight onto the component. Movies must already exist as .movie
/// assets (list_movies; author in the Movie Maker dock). Scene-mutating — refused during play mode.
/// </summary>
/// <param name="id">GameObject GUID to attach to. Omit to create a new 'Movie Player' object.</param>
/// <param name="moviePath">Asset-relative path of the .movie resource to wire (see list_movies).</param>
/// <param name="isLooping">Loop playback.</param>
/// <param name="timeScale">Playback speed multiplier (1 = normal).</param>
/// <param name="createTargets">Let the player create missing track-target objects on play.</param>
/// <param name="playOnStart">Begin playing as soon as play mode starts (intro cinematic).</param>
[McpTool( "add_movie_player" )]
public static Task<object> AddMoviePlayer( string id = null, string moviePath = null, bool? isLooping = null, double? timeScale = null, bool? createTargets = null, bool? playOnStart = null )
=> McpGate.Run( "add_movie_player", McpGate.Args( ( "id", id ), ( "moviePath", moviePath ), ( "isLooping", isLooping ), ( "timeScale", timeScale ), ( "createTargets", createTargets ), ( "playOnStart", playOnStart ) ) );
/// <summary>
/// List the project's .movie resources (Sandbox.MovieMaker clips authored in the editor's Movie
/// Maker dock: Window → Movie Maker). Scans the ENTIRE Assets folder recursively and returns every
/// .movie found — no limit or paging. Returns { count, movies, note } where each movie has { path
/// (asset-relative — the form add_movie_player/play_movie expect), name, loadable (resolves via
/// ResourceLibrary), hasCompiledClip }. Start here before add_movie_player / play_movie — if the
/// list is empty, the movie has to be authored in the dock first (the bridge plays movies; it
/// doesn't author keyframes).
/// </summary>
[McpTool.ReadOnly( "list_movies" )]
public static Task<object> ListMovies()
=> McpGate.Run( "list_movies", McpGate.Args() );
/// <summary>
/// Start MoviePlayer playback. Targets the MoviePlayer on the given GameObject, or the first
/// MoviePlayer in the scene when id is omitted. Pass moviePath to load-and-play a different .movie
/// on the same player; positionSeconds seeks before playing; isLooping/timeScale apply immediately.
/// Clips genuinely advance in PLAY MODE (start_play first, then verify with capture_view) — in edit
/// mode this only sets state, which the response calls out. NOT scene-mutating, so it works during
/// play mode.
/// </summary>
/// <param name="id">GameObject GUID holding the MoviePlayer. Omit to use the first MoviePlayer in the scene.</param>
/// <param name="moviePath">Asset-relative .movie path to load and play (otherwise plays the wired Resource).</param>
/// <param name="positionSeconds">Seek to this time (seconds) before playing.</param>
/// <param name="timeScale">Playback speed multiplier (1 = normal).</param>
/// <param name="isLooping">Loop playback.</param>
[McpTool( "play_movie" )]
public static Task<object> PlayMovie( string id = null, string moviePath = null, double? positionSeconds = null, double? timeScale = null, bool? isLooping = null )
=> McpGate.Run( "play_movie", McpGate.Args( ( "id", id ), ( "moviePath", moviePath ), ( "positionSeconds", positionSeconds ), ( "timeScale", timeScale ), ( "isLooping", isLooping ) ) );
/// <summary>
/// Stop MoviePlayer playback (the counterpart to play_movie). Targets the MoviePlayer on the given
/// GameObject, or the first MoviePlayer in the scene when id is omitted. Pass rewind to also reset
/// the playhead to 0 so the next play_movie starts from the top. Works during play mode.
/// </summary>
/// <param name="id">GameObject GUID holding the MoviePlayer. Omit to use the first MoviePlayer in the scene.</param>
/// <param name="rewind">Also reset the playhead to 0.</param>
[McpTool( "stop_movie" )]
public static Task<object> StopMovie( string id = null, bool? rewind = null )
=> McpGate.Run( "stop_movie", McpGate.Args( ( "id", id ), ( "rewind", rewind ) ) );
}