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 /
avatar image
0
Question by ankush kushwaha · Jan 14, 2013 at 02:14 PM · iosvideoplaybackuvanimation

How to play video on iOS (not on full screen)

I need to play video on iOS but not on the full screen. I have been searching the Google but I found that we can play just full screen video but can not play a video as a texture (movie Texture) of an object as in desktop games. See the link: http://docs.unity3d.com/Documentation/Manual/VideoFiles.html

I have found one solution for it. I am using "Maya" software. And made a plane in which I added a texture which comprise of image sequence. and am able to play it by using script "AnimatedTextureUV.js" .

http://wiki.unity3d.com/index.php?title=Animating_Tiled_texture

It plays the image sequence like a sprite sheet.But my video is stretched at:

var uvAnimationTileX = 24;
var uvAnimationTileY = 1;

and if I make

var uvAnimationTileX = 1;
var uvAnimationTileY = 1;

it shows image in proper ratio and with one tile but do not play image sequence. I don't know about UV very much. Except uvAnimationTileX <=1 && uvAnimationTileY <=1 it works. But obviously it would show many tiles at a single plane. anybody please help me. Thanks :-)

the script i am using is:

 var uvAnimationTileX = 24; //Here you can place the number of columns of your sheet. 
                            //The above sheet has 24
  
 var uvAnimationTileY = 1; //Here you can place the number of rows of your sheet. 
                           //The above sheet has 1
 var framesPerSecond = 10.0;
  
 function Update () {
  
     // Calculate index
     var index : int = Time.time * framesPerSecond;
     // repeat when exhausting all frames
     index = index % (uvAnimationTileX * uvAnimationTileY);
  
     // Size of every tile
     var size = Vector2 (1.0 / uvAnimationTileX, 1.0 / uvAnimationTileY);
  
     // split into horizontal and vertical index
     var uIndex = index % uvAnimationTileX;
     var vIndex = index / uvAnimationTileX;
  
     // build offset
     // v coordinate is the bottom of the image in opengl so we need to invert.
     var offset = Vector2 (uIndex * size.x, 1.0 - size.y - vIndex * size.y);
  
     renderer.material.SetTextureOffset ("_MainTex", offset);
     renderer.material.SetTextureScale ("_MainTex", size);
 }
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 fporter · Jan 28, 2013 at 03:15 PM 0
Share

If you have Unity Pro version then you can roll your own movie texture plugin (what I did) or use one from the asset store, but plugins are pro only.

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Anxo · Jan 14, 2013 at 02:29 PM

Movie Textures are not supported on iOS. Instead, full-screen streaming playback is provided using Handheld.PlayFullScreenMovie.

from the Unity Documentation

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 ankush kushwaha · Jan 15, 2013 at 04:46 AM 0
Share

I know, that is why I am using image sequence ins$$anonymous$$d of video.But I still stuck on playing image sequence. and I can-not use GUIsprite because there are up-to 300 images for a video.

avatar image
1

Answer by jerry678 · Jan 12, 2014 at 06:57 AM

As per unity documentation you can only play video in iOS only via quick time player. until you use third party plugins or sdk

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
1

Answer by u3dxt · Jan 16, 2014 at 07:52 PM

Our plugin U3DXT iOS SDK, among other things, allows you to play videos in "windows" mode. You do not need Unity Pro.

We open the full MediaPlayer framework, but what you are looking for is just the MPMoviePlayerController and setting the bounds. You can do this from Unity3D using C#, Javascript, or Boo without touching XCode.

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.

Follow this Question

Answers Answers and Comments

12 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

Related Questions

Playing from a specific point using Handheld.PlayFullScreenMovie 0 Answers

How to play a video on iPhone without using the native iOS video player? 0 Answers

Trouble getting Google GVRVideoPlayer to Implement in Unity 5.6.2 with Google Cardboard v1.60 0 Answers

Importing a alpha video clip for iOS 0 Answers

Importing and Playing a Video 7 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