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 fjam100 · Nov 27, 2010 at 11:03 AM · objectmousevideoclicktv

Video on an object. For example, a television.

Hello,

To play videos I found this code:

var url = "http://www.unity3d.com/webplayers/Movie/sample.ogg"

Start function () { / / Start download var www = new WWW (url);

/ / Make sure the movie is ready to start Before we start playing var MovieTexture = www.movie; while (! movieTexture.isReadyToPlay) yield;

/ / Initialize texture gui to Be 1:1 resolution centered on screen guiTexture.texture = MovieTexture;

transform.localScale = Vector3 (0,0,0); transform.position = Vector3 (0.5,0.5,0); guiTexture.pixelInset.xMin =-movieTexture.width / 2; guiTexture.pixelInset.xMax = movieTexture.width / 2; guiTexture.pixelInset.yMin =-movieTexture.height / 2; guiTexture.pixelInset.yMax = movieTexture.height / 2;

/ / Assign clip to audio source / / Sync with audio playback audio.clip = movieTexture.audioClip;

/ / Play Both movie & sound movieTexture.Play (); audio.Play ();

}

It works, but the video does not appear on the objects.

1 - I can play the video on an object? I wanted to emulate a television

2 - What code would you use to stop the video with the click of a mouse?

Thanks.

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

1 Reply

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

Answer by IJM · Nov 27, 2010 at 11:31 AM

This will help you:

http://unity3d.com/support/documentation/Manual/Video%20Files.html

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

No one has followed this question yet.

Related Questions

How to make object clickable when user enter collider ? 0 Answers

How to attach objects using a mouse click on one side, and object only attaches to that one side? 0 Answers

Object Movement via Mouse Click? 3 Answers

Destroy objects by clicking on them 1 Answer

OnMouseUp() Click Display Effect. 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