- 最后登录
- 2017-4-1
- 注册时间
- 2011-7-26
- 阅读权限
- 90
- 积分
- 24690
- 纳金币
- 24658
- 精华
- 6
|
比较有实用价值的研究,air与unity3d结合使用摄像头!
There seem to be several solutions to getting webcams to work with Unity, but no one seems to want to post their source. I guess that the arrival of the asset store has made many see the financial opportunities (this of course is no bad thing).
By using sockets, I have created a connection between Flash and Unity3D, I then send the pixel buffer of the webcam over the socket connection and convert the pixel buffer into a UnityEngine.Color array. The current version opens the Air application automatically once you click the Start button, but this seems to only work on Windows. I'll have a look at a Mac solution next week.
If people have a bit of free time (it is a Friday), I'd be grateful if you could take a look and make sure it works on your system. Comments/suggestions are also more than welcome.
Both executables and source can be found here:
https://github.com/rooch84/UnityFlashCam
|
|