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 phoberman · Feb 16, 2012 at 04:59 PM · androidwebcamunity 3.5

Webcam Unity 3.5 not working on Android?

With Unity 3.5, I've got live camera input working on the desktop (MacBook Pro) and iOS (iPhone4), but on both my Android phones (LG Optimus and Samsung Galaxy Nexus) I get zip.

Here's my script, attached to a plane with a RenderTexture:

 #pragma strict
 private var devices : WebCamDevice[];
 public var deviceName : String;
 private var wct : WebCamTexture;
 private var resultString : String;
 
 
 function Start() {
     yield Application.RequestUserAuthorization (UserAuthorization.WebCam | UserAuthorization.Microphone);
     
     if (Application.HasUserAuthorization(UserAuthorization.WebCam | UserAuthorization.Microphone)) {
         devices = WebCamTexture.devices;
         deviceName = devices[0].name;
         wct = new WebCamTexture(deviceName, 640, 480, 30);
         renderer.material.mainTexture = wct;
         wct.Play();
         resultString = "no problems";
     } else {
         resultString = "no permission!";
     }
 }
 
 function OnGUI() {
     for (var i = 0; i < devices.length; i++) {
         GUI.Box(Rect(100, 100+(i*25), 300, 25),devices[i].name);
     }
     GUI.Box(Rect(100, 100+(i*25), 400, 25),resultString);
 }

Any ideas?

Comment
Add comment · Show 3
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 tbjod · Feb 20, 2012 at 02:27 PM 0
Share

Just want to 2nd this, have the same problem on: Samsung Galaxy Nexus (android os v4.0.1) But works well on: Samsung Nexus S (android os v2.3.4) Sony Ericsson Xperia Play (android os v2.3.4) Sony Ericsson Xperia $$anonymous$$ini (android os v2.3.4) Is it a hardware or os version related issue?

avatar image phoberman · Mar 16, 2012 at 02:36 AM 0
Share

There's been some activity on this thread: http://forum.unity3d.com/threads/123732-Webcam-on-Android-not-working/

but no answers yet - very frustrating.

Don't think it's simply hardware or os version - here's what's been reported so far here & on the forum thread:

Works on: Samsung Nexus S (v2.3.4) Sony Ericsson Xperia Play (v2.3.4) Sony Ericsson Xperia $$anonymous$$ini (v2.3.4) Toshiba AT100 (v3.1)

Doesn't work on: Samsung Galaxy Nexus (v 4.0.1) LG Optimus Thrill 4G (v2.3) Asus Eee Transformer TF-101

avatar image casimps1 · Jul 28, 2012 at 02:42 AM 0
Share

I'd like to bump this as well... works on my laptop webcam, but I get solid black on Android

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

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

Is it possible to render Unity graphics elements on top of iPhone / Android video feed? 2 Answers

How do I enable the Android lock screen in developer mode? 1 Answer

So Why is there a x86 option now for Android with Unity 3.5... doesn't work! 0 Answers

Connection to MSSQLServer 2008R2 works fine in Unity Editor, but when it deployed into android device, the connection cannot be open. What should I do? 0 Answers

QR-Code Decoding for iOS and Android 0 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