error CS0103: The name 'WebCamTexture' does not exist in the current context

318 views Asked by At

When i build my project with WebRTCVidechat to a magicleap hardware it abort the operation and send a log error message saying "Assets\WebRtcVideoChat\scripts\UnityCallFactory.cs(1073,37): error CS0103: The name 'WebCamTexture' does not exist in the current context".

No copiler error apears before the build is made.

Part Of The Code:

using UnityEngine;
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
...
        foreach (var dev in WebCamTexture.devices)
                {
                    if (deviceName == dev.name)
                    {
                        if (dev.isFrontFacing)
                        {
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                }

Logs:

Assets\WebRtcVideoChat\scripts\UnityCallFactory.cs(1073,37): error CS0103: The name 'WebCamTexture' does not exist in the current context.

1

There are 1 answers

0
Logout On

Error CS0103: The name 'WebCamTexture' does not exist in the current context" it´s caused by the incompatibility to the platform that i´m building for (MagicLeap).

I didn´t found any solution to fix it.