/*WebCamTexture:网络摄像头材质
WebCamTexture.Play() 播放;
WebCamTexture.Pause() 暂停;
WebCamTexture.Stop() 停止;*/
//经测试此代码可以使用,当你绑定到游戏物体时尽可以了、
using unityEngine;
using System.Collections;
public class Test : MonoBehaviour {
public string deviceName;//这个虽然public,但无需为其绑定变量,直接运行,默认调用,显示本地摄像机的名称
WebCamTexture webCam; // Use this for initialization
void Start () {
WebCamDevice[] devices = WebCamTexture.devices;
deviceName = devices[0].name;
webCam = new WebCamTexture(deviceName, 400, 300, 12);
renderer.material.mainTexture = webCam;
webCam.Play();
} // Update is called once per frame
void Update () { }
}

上述代码,使用标准化的webcam

更多参考:unity3d 中控制手机前后摄像头切换 

 

2.steam论坛中介绍方法:

It's all wrapped up on the SteamVR_TrackedCamera script included with the SteamVR plugin on the Unity Asset Store: http://u3d.as/content/valve-corporation/steam-vr-plugin

https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/Scripts/SteamVR_TrackedCamera.cs

We also include a test script to demonstrate usage:
https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/Extras/SteamVR_TestTrackedCamera.cs

3. 用OpenVR的API打开,此法不是在unity环境中

4.自定义的plugin

It's a standard webcam/capture device. I'd imagine you can use the built in webcam texture system from unity to access it.
I personally use my own plugin (http://popmovie.xyz/ & https://www.assetstore.unity3d.com/#!/content/59097 ) but it's nothing special, anything that uses mediafoundation to capture webcams should be able to cope with it.

HTC Vive前置摄像头API(未测试)的更多相关文章

  1. 如何用openvr api打开vive前置摄像头

    随着越来越多的开发者开始他们的VR开发工作,他们看到了这项技术的巨大潜力,像是Valve这样的公司正在想办法保证他们的软件开发包(SDK)能够提供尽量多的功能.今天这家公司发布了其针对SteamVR的 ...

  2. HTC Vive的定位技术

    Lighthouse空间定位,chaperone系统避免实际障碍物 HTC vive所用的Lighthouse技术属于激光定位技术,Oculus Rift以及索尼PlayStation VR所用的定位 ...

  3. 如何低成本的打造HTC Vive虚拟演播室直播MR视频?

    http://m.toutiao.com/i6298923859378700802/?tt_from=weixin&utm_campaign=client_share&from=gro ...

  4. 如何透过HTC Vive拍摄Mixed Reality (混合现实)影片

    https://www.vive.com/cn/forum/1706?extra=page%3D1 也许你是一位开发者,想为自己的HTC Vive游戏制作酷炫的宣传片:或者你是游戏主播,想为观众带来高 ...

  5. Unity的HTC VIVE SDK研究(手柄按键功能的研究,比较详细)

    http://blog.csdn.net/ystistheking/article/details/51553237 想交流的朋友我们可以微博互粉,我的微博黑石铸造厂厂长 ,缺粉丝啊 .....求粉求 ...

  6. vue实现PC端调用摄像头拍照人脸录入、移动端调用手机前置摄像头人脸录入、及图片旋转矫正、压缩上传base64格式/文件格式

    进入正题 1. PC端调用摄像头拍照上传base64格式到后台,这个没什么花里胡哨的骚操作,直接看代码 (canvas + video) <template> <div> &l ...

  7. HTC Vive 体验的折腾经历

    HTC Vive 是个什么东西, 想必我就不用介绍了, 不知道自己百度吧 HTC Vive发布已经有一段时间了, 一直很纠结买还是不买, 这玩意太贵(官网6888),买了还不能直接用, 还要配太高性能 ...

  8. 【转+自己研究】新姿势之Docker Remote API未授权访问漏洞分析和利用

    0x00 概述 最近提交了一些关于 docker remote api 未授权访问导致代码泄露.获取服务器root权限的漏洞,造成的影响都比较严重,比如 新姿势之获取果壳全站代码和多台机器root权限 ...

  9. C++ primer学习记录(个人猜想未测试版本)

    学习版本:第五版. 本博文主要记录个人曾经并不知晓知识细节. 因为linux下的编译环境还未进行学习.所以实际代码测试将在今后完成. 红色:需确认. 蓝色:重点. 1)const对象设定为仅在文件内有 ...

随机推荐

  1. cocos2d-x 2.1 -- 读取.plist文件

    在cocos2d-x中可以用.plist格式的文件来保存数据,它是XML文件格式的一种,在cocos2d-x解析.plist方面相关的资料比较少,但本身也很简单,要解析.plist文件可以参考coco ...

  2. C# 构建S7服务器 西门子的虚拟服务器 测试通讯 HslCommunication应用

    本文将使用一个gitHub开源的组件技术来实现S7服务器的功能,使用的是基于以太网的TCP/IP实现,不需要额外的组件 github地址:https://github.com/dathlin/HslC ...

  3. HDU 3455

    http://acm.hdu.edu.cn/showproblem.php?pid=3435 同下题,只是这题是双向边,同时让我认识到了一个问题,一个图拆点做二分图完美匹配的本质是求该图环的并 htt ...

  4. 【python基础】如何注释代码块

    前言 编写python程序有时候需要对代码块进行comment,本文对此介绍. 方法 python注释的三种方法: 1.井号注释单行代码: # 2.三个单引号或三个双引号注释语句块: ''' 或者&q ...

  5. VS2015 Release 生成调试信息

    - C/C++ > 常规 > 调试信息格式 - C/C++ > 优化 > 优化 > 禁止(/Od) - 链接器 > 调试 > 生成调试信息 > 是 (/ ...

  6. UVa 10410 树重建

    Tree Reconstruction Problem Description You have just finished a compiler design homework question w ...

  7. python list 去掉重复元素

    貌似用遍历最方便. http://www.cnblogs.com/tudas/p/python-delete-duplicate-element-from-list.html

  8. cin和cout详解

    无论输入数字还是字符串,一个回车键是把输入的这个东西送到变量中,可以一次性送到 一个(或者多个)空格键是分隔这些值的 cout <<N; for(int i=0;i<5;i++) { ...

  9. ory Oathkeeper cloud native 访问认证平台

    ORY Oathkeeper is an Identity & Access Proxy (IAP) that authorizes HTTP requests based on sets o ...

  10. GridView实现数据编辑和删除

    <asp:GridView ID="gv_Emplogin" runat="server" AutoGenerateColumns="False ...