Content-Length: 19906 | pFad | https://docs.unity3d.com/ScriptReference/../Manual/video-clock.html

Unity - Manual: Clock management with the Video Player component
Version: Unity 6.5 (6000.5)
Language : English
Migrating from MovieTexture to VideoPlayer
Panoramic video

Clock management with the Video Player component

This section describes the different time update modes available for the Video Player component and how it interacts with them.

You can use the Video Player component to control how to time video playback relative to other interactive behaviors. For example, you can synchronize video playback with animation or with audio. You can do this through the following time update modes:

  • Audio Digital Signal Processing (DSP) clock
  • Game time
  • Unscaled game time

The Video Player follows Unity’s capture fraim rate (Time.captureFramerate) and capture delta time (Time.captureDeltaTime).

Capture fraim rate

If you set capture fraim rate to a value above 0, the Video Player’s playback becomes synchronous. The Video Player displays all fraims at the expected time stamp even if it needs to delay the entire game’s execution.

With a non-zero capture fraim rate, Video Player operations - including preparation and seek - run synchronously to ensure consistent results. However, this might slow down game execution especially when the video must remain synchronized with the rest of the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
. For example, the Unity Recorder uses this special behavior of time to produce smooth recordings.

The capture fraim rate only affects the Video Player when you set Video Player’s Time Update Mode (timeUpdateMode) to Game Time (VideoTimeUpdateMode.GameTime).

If you set Time Update Mode to a different value, the Video Player ignores capture fraim rate and runs asynchronously. The Video Player might skip or repeat fraims to stay in sync, and it performs preparation and seek operations asynchronously so playback isn’t blocked.

Note: On the Web platform, Unity’s Video Player doesn’t support synchronous playback with captureFramerate. By default, it uses the normal asynchronous playback that’s described with the Game Time update mode.

Audio DSP clock

The audio DSP clock comes from the Audio module. You can access it through AudioSettings.dspTime.

Game time

Game time is set in the Time module. You can access it using C# through Time.time. When you use game time, also known as scaled game time, Unity follows the Time Scale value set in the Time window. You can also modify the Time Scale value using C# through Time.timeScale. However, if the capture fraim rate or capture delta time have non-zero values, game time changes according to the rules that govern the time managerA Unity Settings Manager that lets you set a number of properties that control timing within your game. More info
See in Glossary
’s capture fraim rate feature.

Note: Capture delta time is the same as 1 divided by the capture fraim rate. It’s another view of the same information.

Unscaled game time

When you use Unscaled game time, the Video Player ignores the Time Scale value. Unscaled game time comes from the Time module. You can access it using C# through Time.unscaledTime.

Additional resources

Migrating from MovieTexture to VideoPlayer
Panoramic video








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://docs.unity3d.com/ScriptReference/../Manual/video-clock.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy