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 /
avatar image
3
Question by sirius_black9999 · Oct 13, 2015 at 05:59 PM · webcamtexturewebcamwindows phone 8

[WP8.1] WebcamTexture won't play

The code

 this.texture = new WebCamTexture();
 this.texture.Play();

Causes the error

 Error: operation has failed with error 0x80028019: old format or invalid type library.
 (C:/Buildslave/unity/build/PlatformDependant/MetroPlayer/VideoTexture.cpp:WebcamTexture::Play at 388)

and won't play the webcam texture.

Player settings:

  • webcam and microphone access are enabled

  • compilation overrides is set to "none"

  • API compatibility level is .net 2.0

Build settings:

  • Build target: windows store

  • SDK: Phone 8.1

  • development build

the rest is pretty much kept at the default settings, there is 1 script, a panel and a preview texture on screen

here's the full code of the script:

 using UnityEngine;
 using System.Collections;
 using UnityEngine.Events;
 using UnityEngine.UI;
 
 public class FindCameras : MonoBehaviour
 {
     public RawImage preview;
     public GameObject templateButton;
     private WebCamTexture texture;
 
     // Use this for initialization
     void Start () {
         foreach ( var child in GetComponentsInChildren<Transform>() )
         {
             if(!child.gameObject.name.Equals("Panel"))
             Destroy(child.gameObject);
         }
         for ( int i = 0; i < WebCamTexture.devices.Length; i++ )
         {
             GameObject button = Instantiate ( templateButton );
             Button actualButton = button.GetComponent < Button>();
             Button.ButtonClickedEvent evt = new Button.ButtonClickedEvent();
             int i1 = i;
             evt.AddListener(
                             () =>
                             {
                                 texture.Stop();
                                     this.texture = new WebCamTexture(WebCamTexture.devices[i1].name);
                                     preview.texture = texture;
                                 this.texture.Play();
 
                             } );
 
             actualButton.onClick = evt;
             button.GetComponentInChildren < Text > ().text = WebCamTexture.devices [ i1 ].name;
             button.transform.parent = transform;
         }
 
         this.texture = new WebCamTexture();
         this.texture.Play();
         preview.texture = texture;
     }
     
     // Update is called once per frame
     void Update () {
 
     }
 }
 



Comment
Add comment · Show 2
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 Pawscal · Jan 29, 2016 at 03:21 PM 1
Share

Hi there. I've got the same problem. We are expreimenting with multiple platforms and my webcam test works everywhere but when building for WindowsStore.

So far i've spent a lot of time looking for an answer, found stuff about either localisation or x64/x86 but but have not been able to fix the issue.

I was wondering if you had found a solution to your problem.

Will post an update if i get it to work.

Thanx!

avatar image schpinn · Jul 13, 2016 at 03:58 PM 0
Share

Has anyone ever found a fix for this issue? I've encountered it as well and can't get to the bottom of what's causing it.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by eemre · May 07, 2018 at 01:57 PM

Any progress on this?

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.

Follow this Question

Answers Answers and Comments

33 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

Related Questions

how to track object motion with webcam 0 Answers

Webcam GetPixels is only returning black 1 Answer

Show a WebCamTexture with alpha 1 Answer

WebcamTexture not refreshing 0 Answers

Web Cam Texture on UI Panel 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