• 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 /
avatar image
1
Question by TenCommander · Jan 17, 2012 at 01:16 PM · augmented realityprime31

Prime31 Augmented Reality - Video Texture Help

Hi There, I have a problem with the startVideoTexturePlayback() method on iphone - I cant figure out where to put the video file i want to stream. The documentation states:

// Starts up the video texture. filename can be either just the filename (if the video file is in the root of the app bundle) // or a full path to the file public static Texture2D startVideoTexturePlayback( string filename, int width, int height, bool shouldLoop )

Can anyone tell me where the the root of the app bundle is? - I have tried alot of locations and file path strings and I dont seem to get it right : ) a short claryfication would be nice, thanks in advance.

/Joe

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by neoRiley · Feb 07, 2012 at 06:08 AM

You're supposed to put the videos in a folder called StreamingAssets - just add this in the project view as a top leve folder (not parented). The video format should be m4v and all you do is pass the entire name of the file "myvideo.m4v".

I'm having a bug where by it only plays this one video, and even if I delete the video and confirm its not apart of the project, it still plays that video. I'm trying to find answers to that one.

Comment
Add comment · 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
0

Answer by muimota · Mar 21, 2012 at 12:07 AM

I had the same problem I had to edit the _arStartVideoTexturePlayBack ARBinding.m :

 // video texture methods
 void _arStartVideoTexturePlayback( const char * filename, int textureId, bool shouldLoop )
 {
     NSString *path = GetStringParam( filename );
     NSString *auxPath;
     // if the url starts with '/' then use it directly else get the bundle path
     if( ![[path substringToIndex:1] isEqualToString:@"/"] )
     {
                 //I've added this variable so 'path' does not get destroyed if it is not found
         auxPath = [[NSBundle mainBundle] pathForResource:path ofType:nil];
     
         // if we still dont have a valid path, check the StreamingAssets folder
         if( !auxPath )
             auxPath = [[NSBundle mainBundle] pathForResource:path ofType:nil inDirectory:@"Data/Raw"];
     }
 
     if( !auxPath || ![[NSFileManager defaultManager] fileExistsAtPath:auxPath] )
     {
         NSLog( @"could not find video file! Please make sure your video file is either in the app bundle or in the StreamingAssets folder" );
         return;
     }
 
     path=auxPath; 
 
 
     [VideoTextureManager sharedManager].textureId = (GLuint)textureId;
     [VideoTextureManager sharedManager].loop = shouldLoop;
     [[VideoTextureManager sharedManager] startPlayback:path];
 }   
Comment
Add comment · 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
0

Answer by TenCommander · Feb 07, 2012 at 12:16 PM

Ii had the same problem, I could add a new video by changing the file name and adding a new video file.

Comment
Add comment · 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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

Prime31 - Augmented Reality - Camera "Still" Photo Help 1 Answer

Failed first attempt when inviting friends using the Prime31 iOS Facebook Plugin 1 Answer

prime31 Facebook Login Question 0 Answers

Is there any way to know when a user rated the app using prime31's Etcetera plugin? 0 Answers

SHA1 Hash same as Facebook Hash? (prime31 social plugin) 2 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