CRIWARE Unity Plugin Manual
Last Updated: 2024-07-12
[CriMana] Seek playback
Description of the sample
Overview
This sample performs seek playback. It uses a runtime script to play a movie from any position (frame).
Seek playback is performed from the runtime script based on the user operations (using the CriManaMovieController placed in Unity Editor).
You can start the movie at a desired position by moving the slider on the screen.
This sample program starts playing a movie from any position (i.e. based on the specified seek position).
The runtime script uses the API of the CriManaMovieController component to specify the seek position.
In this sample, the component was added beforehand in Unity Editor.
Specifying the seek position
In seek playback, the CriMana.Player::SetSeekPosition function is used to specify a frame number before starting playback.
When the movie is being played, the CriMana.Player::Stop function or the CriMana.Player::StopForSeek function requests the stop of playback. Then, the seek position is specified to start playback.
void Update() {
if (requestedSeek && movieController.player.status == CriMana.Player.Status.Stop) {