But it forces you to deal with asynchronous execution. Using is the most efficient way to do this because it's non-blocking. Here, you can copy the pixels from VideoPlayer.texture into a texture of your own for future display.When prepare completes (you can either wait for isPrepared to be true, or use the prepareCompleted event), invoke VideoPlayer.Pause(): this will cause the frameReady handler to be invoked when the first frame is ready.Enable the frameReady events by setting sendFrameReadyEvents to true ( ) and then attaching a handler to the frameReady event ( ).Call VideoPlayer.Prepare() to have the source loading bootstrapped.Set the VideoPlayer url (or VideoClip) that you want to inspect. This is so it doesn't try to display content somewhere in the scene while your background setup is happening. Set its renderMode to APIOnly (see and ).Create a VideoPlayer for the purpose of extracting these frames.Unity's VideoPlayer makes this possible, but not easy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |