Log in or register to post comments

Can't access anything in the QCAR scripts

February 29, 2012 - 7:01am #1

so, I'm trying to access the video texture from the camera, and I'm hitting a wall in the first step of getting to that...

As soon as I write this:

function Start() {
QCARRenderer.Instance.DrawVideoBackground = false;
}

and save the script, I get an error:

BCE0005: Unknown identifier: 'QCARRenderer'

What am I doing wrong? I haven't found anything pointing to anything that should be done before writing that line... I'm not a coder, but I do think the documentation should be made clear enough for newcomers to learn.

Re: Can't access anything in the QCAR scripts

February 29, 2012 - 11:07pm #5

Thank you, it all works now :)
I just moved the whole scripts-folder from Qualcomm AR-folder under Standard Assets.

And I'm not planning to learn c# just yet... I'm just getting the hang of javascript :D

Re: Can't access anything in the QCAR scripts

February 29, 2012 - 7:34am #4

It seems to be an issue with the compilation order. When you try to call C# scripts from javascript, you need to ensure that the C# script is compiled prior to the javascript script by Unity. This is determined by their placement in the Project directories - see the link.

http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html

The easiest way to resolve this will be to use a C# script instead. You can use the VideoTextureBehaviour script as a template, change the class name and remove the sections that you don't need.

Re: Can't access anything in the QCAR scripts

February 29, 2012 - 7:16am #3

That's the whole script right now, I deleted everything else in it to see if it's just this causing the problem, and it seems to be so.

Re: Can't access anything in the QCAR scripts

February 29, 2012 - 7:14am #2

I'd need to see the rest of your script.

Take a look at the VideoTextureBehaviour script in /Qualcomm Augmented Reality / Scripts. It's setting the DrawVideoBackground property in the same way that you are trying to.

Log in or register to post comments