Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm pretty new to this, and I'm having trouble figuring out where to even look. If there's relevant terminology that'll be google-able, that would be a great help.

Suppose I want to have a monitor in-game that displays the output from a camera that's in the same room as the player. Are there libraries for grabbing and rendering that data?

share|improve this question

closed as not constructive by Josh Petrie, Byte56, bummzack, Sean Middleditch, Trevor Powell Feb 15 '13 at 3:41

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Did your question get cut short? –  Byte56 Feb 14 '13 at 3:04
1  
lmgtfy.com/?q=webcam+unity –  Trevor Powell Feb 14 '13 at 3:26
    
I removed the half-completed part of the question, but I'm not sure this is a good question for this site as it stands because it asks for, essentially a list of answers. –  Josh Petrie Feb 14 '13 at 6:28
add comment

2 Answers 2

up vote 1 down vote accepted

The easiest way would be with render textures, but that is a Pro feature. If you need it for the free version, there might be a good alternative script somewhere. I've been hunting for months and haven't found anything that great. You could try scripting one yourself. If you do, I'm sure many would pay a fair price on the Asset Store so they don't have to buy all of Unity Pro.

share|improve this answer
add comment

What you might want to look at is a method to first capture the output of that camera to a JPEG. This could be a program supplied with your camera, or a freeware application from the internet.

After you have a JPEG image, you can simply use Texture2D.LoadImage http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.LoadImage.html

This will provide a new image to the texture as often as you call the loadimage method. If fast enough, it will appear as video, instead of screen captures.

Then, apply the texture to a gameobject within your game with something like

renderer.material.mainTexture = cameraJPEGtexture;
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.