Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 /
  • Help Room /
avatar image
0
Question by rdummin · Jul 10, 2017 at 10:01 PM · vraugmented realitywebcamtexturewebcamoculus rift

Moving a working webcam texture background project into an oculus VR project, can only see background now instead of the webcam video feed?

I am messing around with a possible augmented reality project utilising webcams and an oculus rift. I want to bring up overlays to the user's view, with the webcam always as the background layer. My project without Oculus enabled works fine: image

But when I simply enable VR support (Oculus SDK) in edit -> project settings -> player, I can no longer see the webcam when i run it, neither in the scene view or through my CV1 oculus: image Clearly it is showing the blue background setting instead of the background texture i am telling it to in code. When I move the oculus around, at the bottom i can only just see a slither of the webcam image poking through. Is there a simple layering issue i am not aware of?

I have tried this but I couldn't get it to work - I am not sure what the settings of the "WebCam" Material that he has in his Raw Image in the inspector, and alas I do not even really know what that material is. My naive thought is that since I have set the background texture to be the webcam texture, that should handle everything:

 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
 
 public class webCam : MonoBehaviour
 {
     public RawImage rawimage;
     void Start()
     {
         GUITexture BackgroundTexture = gameObject.AddComponent<GUITexture>();
         BackgroundTexture.pixelInset = new Rect(0, 0, Screen.width, Screen.height);
 
         WebCamDevice[] devices = WebCamTexture.devices;
 
         WebCamTexture webcamTexture = new WebCamTexture(devices[0].name);
         BackgroundTexture.texture = webcamTexture;
 
         webcamTexture.Play();
     }
 }

I also tried this and this but I run into issues as they seem to be for older versions of unity that used options that no longer exist (well, were likely replaced by better ones).

I have to apologise because this is actually my first foray into Unity, so if I have missed out on fairly basic concepts then that is why. I intend to do some tutorials when I have time, but this is for a rapid prototyping project for work so I was really just hoping to get a basic demo of webcam(s) feeding into the oculus rift.

Thank you for your help

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

0 Replies

· Add your reply
  • Sort: 

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.

Follow this Question

Answers Answers and Comments

137 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

Related Questions

Game view color is different when running VR 0 Answers

multiple video sources AR (ARToolKit or Vuforia) 0 Answers

Help me doing teleportation with oculus touch 1 Answer

WebCamTexture nullpointerexception 1 Answer

Priview The Screenshot for User 0 Answers


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