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 CipherZero · Sep 25, 2013 at 04:50 AM · windowswebcamtexturewebcamtabletwindows8

WebCamTexture cannot be displayed in Windows 8 tablet(HP ElitePad)

UPDATE: I've found out that the plane didn't actually disappeared, it's just it has used some garbage texture which has the same color of that of skybox(or maybe it's transparent)

Now I've used WebCamDevice to somehow make the plane to display the first "webcam's texture", though it's all black in color, which probably is a result of haven't turn on the webcam.

Clarifying: I'm trying to build an exe file to run on the target tablet(HP elitepad), but as I've mentioned above, the camera can't be turned on. That makes me to think that maybe I need to somehow build the project as Windows Store App to make the camera to be working

Hello everyone, currently I'm working on a project that involves using built-in camera to display what the camera sees. The scene in my project is a very simple setup, a Main Camera, a plane object for displaying what the built-in camera sees and a directional light. The below code is attached to the plane and works perfectly in editor.

 private WebCamTexture webTEX;
 void Start () 
 {
     webTEX = new WebCamTexture();
     renderer.material.mainTexture = webTEX;
     webTEX.Play();
 }

But when I built and project and put it into the tablet for testing, the plane just simply disappeared.

I've tried another approach:

 IEnumerator Start() 
 {
     yield return Application.RequestUserAuthorization(UserAuthorization.WebCam | UserAuthorization.Microphone);
     if (Application.HasUserAuthorization(UserAuthorization.WebCam | UserAuthorization.Microphone)) 
     {
         webTEX = new WebCamTexture();
         renderer.material.mainTexture = webTEX;
         webTEX.Play();
     } else {
         
     }
 }

But still no luck.

so I've used OnGUI() to display some information for debugging:

 void OnGUI()
 {
     GUI.Box(new Rect(10, 10, 100, 100), "hello world");
     
     GUI.Box(new Rect(10, 120, 250, 100), webTEX.deviceName);
 }

And they work perfectly fine in the editor and in the tablet. Both giving out the text "hello world" and the cameras' name.

Anyone have any idea that I can make this work? Any help would be greatly appreciated.

(My unity version is Version 3.5.7f6)

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

0 Replies

· Add your reply
  • Sort: 

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

15 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

Related Questions

Dual Webcams work under Windows but not Linux 2 Answers

Live webcam stream in unity 2 Answers

Webcam Texture and Flashlite (Android) 3 Answers

Webcam with no name 3 Answers

PhotoCapture switch device multiple USB webcam 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