• 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
1
Question by kebin628 · Oct 29, 2020 at 01:25 AM · cameratexture

How to import virtual camera image to WebCamTexture (ex. OBS Virtual Camera, NVIDIA Broadcast)

Hi,

I'm trying to show "virtual camera" image on Unity. The examples of virtual camera are OBS Virtual Camera, XSplit VCam, NVIDIA Broadcast, etc.
It is not cinemachine function.

First, I searched webcamera devices by WebCamTexture.devices, and played WebCamTexture object.

 for (int i = 0; i < WebCamTexture.devices.Length; i++) {
      var device = WebCamTexture.devices[i];
      Debug.Log ($"Device Found: {i}, {device.name}");
 }
 int DeviceID = 3;
 string deviceName = WebCamTexture.devices[DeviceID].name;
 Debug.Log ($"Initializing Device: {DeviceID}, {deviceName}");
 var webcamTexture = new WebCamTexture (deviceName);
 webcamTexture.Play ();
 Debug.Log ($"Initialized Device: {DeviceID}, {deviceName}");


As a result, the all virtual cameras and physical cameras were listed, but the WebCamTexture object occured below error on WebCamTexture.Play() only virtual cameras.

 Device Found: 0, Logicool BRIO  <= Physical web-camera
 Device Found: 1, OBS-Camera
 Device Found: 2, Camera (NVIDIA Broadcast)
 Device Found: 3, OBS Virtual Camera  <= Selected virtual camera
 Initializing Device: 3, OBS Virtual Camera
 ERROR - Could not find specified video device  <=UnityEngine.WebCamTexture:Play()
 Initialized Device: 3, OBS Virtual Camera


So I checked virtual camera images can be displayed on another software(ex: Microsoft Teams, Discord, etc) to check the virutal camera are valid. Finally, the virtual camera images are displayable on these software, therefore I found the virtual camera's and physical camera device are valid.

Does anyone have informations of this trouble and have another solution?
And this trouble is happend only me?

Environment
- Windows 10
- Unity 2020.1.10f.1
- OBS 26.0.2

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by stanopt · Dec 02, 2020 at 03:52 AM

dude, you just can try the other ways to get virtual camera images such like AVPro Live Camera plugin, I do many try on WebCamTexture but totally not work.

And the BadNews is even AVPro Live Camera has some issue too, it can't get the virtual camera of OBS native application, you have to use this plugin of OBS:

Comment
Add comment · Share
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
0

Answer by sonnyb · Dec 21, 2021 at 05:23 PM

See my post on Unity Forums for full details, but basically:

I reverted to an older version (to a version before the virtual camera was a built-in OBS feature) and installed:

  • OBS 25.0.8

  • OBS Virtualcam 2.0.5

  • reg_path.reg from OBS-VirtualCam 1.2.1

Comment
Add comment · Share
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

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

235 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Path Trigger Animation 1 Answer

Overlaying an image over a certain camera? 1 Answer

Clarification with Texture2D.ReadPixels. 1 Answer

Texture Size doesn't match collider size 0 Answers

Render texture on slim plane 1 Answer


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