Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: A3DStudio on May 12, 2013, 06:02:25 PM

Title: Webcam support[SOLVED]
Post by: A3DStudio on May 12, 2013, 06:02:25 PM
Webcam support actions for Playmaker.
Supports multiple cameras and works also on Mobile phones. (tested on android samsung galaxy s3)

There are 3 actions: Check For Webcam, Get Webcam Name and Set Webcam Material

CheckForWebcam.cs
This action check your computer or mobile phone for a camera and send a appropriate event.

GetWebcamName.cs
Store the camera name as a string. If the system has multiple cameras (mobile), you can store the names to several strings. You can also store the camera count to a integer.

SetWebcamMaterial.cs
Set here the camera name and a empty material to stream the video.

Screenshots:
(http://a3ds.files.wordpress.com/2013/05/webcam_0.jpg)

(http://a3ds.files.wordpress.com/2013/05/webcam_1.jpg)

(http://a3ds.files.wordpress.com/2013/05/webcam_2.jpg)

(http://a3ds.files.wordpress.com/2013/05/webcam_3.jpg)

Title: Re: Webcam support
Post by: Alex Chouls on May 12, 2013, 11:49:29 PM
Cool! Can't wait to try these out! :)
Title: Re: Webcam support
Post by: Uladzimir on June 18, 2013, 03:55:23 PM
tested by ipad3 - works fine. thank you!!
Title: Re: Webcam support
Post by: cmvrgr on October 29, 2013, 10:47:16 PM
I used an external camera on my mac and it works simultaneously with 2 cams.

On my win7pc it just turn on one cam only at a time why ?

can I use a TVs tunner as a webcam ?
Title: Re: Webcam support
Post by: MIA_DEV on October 20, 2015, 10:07:23 PM
I purchased playmaker but dont have webcam option in action browser, why is that? :(
Title: Re: Webcam support
Post by: djaydino on October 21, 2015, 01:40:38 AM
Hi these are custom actions that you can get on the forum and most of them on the EcoSystem (https://hutonggames.fogbugz.com/default.asp?W1181)
Title: Re: Webcam support
Post by: djaydino on October 21, 2015, 01:41:43 AM
Hi,
i will check them out tonight and add them to the Ecosystem.
Title: Re: Webcam support
Post by: djaydino on October 21, 2015, 01:39:00 PM
Hi,
These Actions Are now Available on the EcoSystem (https://hutonggames.fogbugz.com/default.asp?W1181)
Title: Re: Webcam support
Post by: MIA_DEV on October 21, 2015, 09:42:37 PM
WOW! THANK YOU SO MUCH! @djaydino
Title: Re: Webcam support
Post by: MIA_DEV on October 22, 2015, 02:20:42 AM
Hi there!
Only the built in rear camera is currently supported. How about external or usb camera? Please help. Thanks!
Title: Re: Webcam support
Post by: jeanfabre on October 27, 2015, 06:31:32 AM
Hi,

 you get a list of what Unity sees as web cameras being registered by the Operating system.

so if you only see a Rear cam, it's your OS/Unity that only sees this one. if you plug a Usb cam, make sure you refresh, I know on windows for example, plugin a joystick while the app is running won't register it, you'll have to restart. it may be the same for webcams.


Bye,

 Jean
Title: Re: Webcam support
Post by: MIA_DEV on October 28, 2015, 03:48:36 AM
Hello Jean!

Sorry i forgot to mention, im working on android. In pc, there's no problem in getting the list of webcams, but on android, the only thing in the list is the internal camera of my tablet (rear and front cam). All i want is to see the usb camera attached on it. What should i do? Thanks in advance.

Title: Re: Webcam support
Post by: jeanfabre on October 28, 2015, 07:56:59 AM
Hi,

 it's unfortunatly nothing you can do about it then, as the list of webcam comes from what Unity gives us...

Bye,

 Jean
Title: Re: Webcam support
Post by: MarkD on May 29, 2018, 11:37:48 PM
Resurrecting a really old thread, but super thankful I found it!

Can any of you smart people help me understand the object setup portion of this?

I made and posted a 30 second video to show you my current setup.

https://youtu.be/ql8v2RAFwiI (https://youtu.be/ql8v2RAFwiI)

I've made a empty material and applied that to an image.  All I get is a black screen.  I can confirm the camera works and it's not in a totally dark room. :)

Title: Re: Webcam support
Post by: djaydino on June 01, 2018, 06:43:14 PM
Hi,
I can see that there is a Mesh Renderer component.
That should be removed.
But that is not the main issues.

You need to change the shader to for example Unlit/Texture
Title: Re: Webcam support
Post by: MarkD on June 02, 2018, 12:41:25 AM
And boom goes the dynamite.  That did the trick!

Thank you! :)
Title: Re: Webcam support[SOLVED]
Post by: t4d on January 14, 2022, 06:18:27 PM
is this still working in unity 2020 ? not working here ?

does it need a render texture or ? 

all seem to work finds my camera etc but nothing appears on the material ?