Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jun 04, 2015 at 07:16 AM by KoJix for the following reason:

Problem is not reproducible or outdated

avatar image
0
Question by KoJix · Jun 03, 2015 at 07:26 AM · texturetriggerkinectmovietextureframes

Play specific frames of your movieTexture

Hallo,

Maybe this is a question with the most simple answer, but I can't find a solution.

I got a MovieTexture with 300 frames. I want to play frame 0-200 in a loop. I created a triggerEvent for the Windows Kinect V2 to do something if the player is between 100cm from the kinect. At that point i want to play frame 200-300 once.

How can I do this? I'm using Unity 4.6.5PRO. I also tried the AVPRO plugin for unity but with no succes.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image KoJix · Jun 03, 2015 at 08:30 AM 0
Share

Help is always welcome! You'll get a cookie if you got the solution!

1 Reply

  • Sort: 
avatar image
0

Answer by Lordinarius · Jun 03, 2015 at 08:37 AM

Hi

There is no api for frame selection. So you should do it with your own script. You can convert time domain to frame domain.

Example:

video1.mp4 -> 30 fps, for 10 sec total frames 300

1/30 sec per frame

 float GetFrameTime(int fps,int frame) 
 {
    float periot = 1.0f/fps;
    return periot*frame;
 } 

   

Now you can check frames of your video

 if (myMovieTexture.time >= GetFrameTime(30,200)) {
 
     myMovieTexture.time = GetFrameTime(30,0);
 }

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image KoJix · Jun 03, 2015 at 09:09 AM 0
Share

Hey, Thanks for your reply I'll test it out

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Render MovieTexture frame by distance. 0 Answers

Changing Part Of Texture/Material 1 Answer

[SOLVED]my original texture change to movie texture 0 Answers

Texture BoxCollider2D in scene view only 1 Answer

Using Video in a 4.6 UI 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges