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 The_Magical_Kiwi · Jul 26, 2012 at 11:02 AM · materialrenderermovie texture

Playing a movie texture. No .Play() definition in UnityEngine.Texture class (Documentation seems to think there should be)

Hey,

I'm trying to play a movie that I have placed as a texture onto a material.

The movie texture script reference says the following:

 // this line of code will make the Movie Texture begin playing
 renderer.material.mainTexture.Play();


However the Texture class does not contain a definition for Play(). Can anyone tell me where I'm going wrong?

My object has several materials so I am referencing the one with the movie texture on using renderer.materials[index] but I've also tried on an object with just one material and referenced it via the the example code supplied above.

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 JChilton · Apr 23, 2014 at 04:49 PM 0
Share

(renderer.material.mainTexture as $$anonymous$$ovieTexture).Play()

2 Replies

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

Answer by Meltdown · Jul 26, 2012 at 12:17 PM

Try this method as described in the documentation

Comment
Add comment · Show 3 · 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 The_Magical_Kiwi · Jul 26, 2012 at 12:41 PM 0
Share

Yea this is the method I went for in the end. Thanks.

avatar image bradfrankshaw · Dec 18, 2013 at 01:30 PM 0
Share

How did you get this to work in the end? We have a game object prefab which is a TV screen, each component has a texture. The screen has a movie texture. The movie is the 3rd or index[2] texture. Putting this single texture on a cube and using the well established: function Start () { renderer.material.mainTexture = movTexture; movTexture.Play(); }

code to make it play works. But on the TV it doesn't.

I know we have to reference the materials array stack somehow (materials[2]?), but Unity scripting is quite new to us. Using either C# or Javascript, can someone please give a definitive code answer?

many thanks for any help

avatar image The_Magical_Kiwi · May 19, 2014 at 03:47 PM 0
Share

I'm guessing I'm a bit late to reply to this, sorry I didn't see it sooner. The only thing I can think of is that movie textures don't work without unity pro.

avatar image
0

Answer by soulpsq · Apr 23, 2014 at 03:08 PM

You can see the site below, I think it can help you http://www.41post.com/3687/programming/unity-how-to-use-a-gui-texture-to-play-fullscreen-videos

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

9 People are following this question.

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

Related Questions

Changing two different objects renderer colour 1 Answer

Issue with Mesh Renderer and Skinned Mesh Renderer 0 Answers

Changing material of objects by the tag in different scenes 0 Answers

appear/disappear gameobject 3 Answers

SetFloat doesn't work 1 Answer


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