Log in or register to post comments

How can I have Multiple Vuforia Configurations with 6.2.10?

March 28, 2017 - 3:29pm #1

Hi,

In my app I had multiple Vuforia ARCamera prefabs each with a slightly different configuration. My scenes referenced these and initialized them when they loaded.

Now it looks like we are stuck with one configuration for the entire app.

But I need different scenes in my app to use different configurations, and for Vuforia to be destroyed when the scene closes.

How can I achieve this now?

Thanks in advance

How can I have Multiple Vuforia Configurations with 6.2.10?

July 3, 2017 - 1:00am #7

Well with a stroke of Inspiration from God I knew there must be some simple solution to my problem and there was.

Newbie as I am with no background in any computer language I was able to find what worked for me.  I hope it helps you.

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using Vuforia;

public class ArMode : MonoBehaviour {

// Use this for initialization

void Start () {

         MixedRealityController.Instance.SetMode (MixedRealityController.Mode.HANDHELD_AR);

}

}

Name the script as you wish for the different modes and plug in the Mixed reality controller mode you need.  Attach it to the  ARcamera and it should switch from the preconfigured mode to the new mode when your scene loads.

I imagine any subsequent scene will go back to the preconfigured mode but I have not tested it out. 

A few short scripts  and you should easily be able to set any configuration to the camera at scene load. (I think)

Of course this only helps with the viewer mode configuration.  Not sure which configuration you were looking for.

Mode 

VIEWER_AR

VIEWER_VR

ROTATIONAL_VIEWER_AR

HANDHELD_AR

HANDHELD_VR

ROTATIONAL_HANDHELD_AR

Hope this helps.  Wish I could have helped earlier.

How can I have Multiple Vuforia Configurations with 6.2.10?

July 2, 2017 - 7:47pm #6

I have the same problem. I had two configurations working before I bought a license and after my purchase when I set the configuration in my AR cardboard viewer scene, it switches my AR configuration in another scene to be the same where it is meant to be a full screen. I am not an advanced user and I have my app set up with a menu which launches parallel scenes for full screen or cardboard users. I shouldn't have to relearn everything when it was working fine before I bought the license. I need to have different setups for each set of scenes.

How can I have Multiple Vuforia Configurations with 6.2.10?

April 7, 2017 - 3:05pm #5

davidosullivan wrote:

Hi,

In my app I had multiple Vuforia ARCamera prefabs each with a slightly different configuration. My scenes referenced these and initialized them when they loaded.

Now it looks like we are stuck with one configuration for the entire app.

But I need different scenes in my app to use different configurations, and for Vuforia to be destroyed when the scene closes.

How can I achieve this now?

Thanks in advance

What specific settings of the ARCamera differed between your scenes and which ones are you trying to change per scene?

How can I have Multiple Vuforia Configurations with 6.2.10?

April 7, 2017 - 2:30am #4

If there's a fix for thise Vuforia's 'feature', its already been posted or a tutorial out there. And the typical answer from the support team would be "please refer to bla bla bla..". So its obvious they dont have any answer for it nor they seem to care. Tough luck that most still stuck with Vuforia coz other alternative is expensive, Vuforia team know this too, hence their attitude.

Some of the support used to be helpful, but when the new company took over, its been shitty. Pardon the harsh word.

 

How can I have Multiple Vuforia Configurations with 6.2.10?

March 29, 2017 - 4:27pm #3

Ok I have made a VuforiaSettings class that has the same fields in as VuforiaConfiguration and found that I can initialize an derived ARCamera object that can load these settings into VuforiaConfiguration.Instance and that works.

What is a problem now is if I navigate away from that scene into a 'non-Vuforia' Scene and then navigate back into that scene. Then I get:-

Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object

  at Vuforia.DatabaseLoadARController.LoadDatasets () [0x00000] in <filename unknown>:0

  at Vuforia.VuforiaARController.Start () [0x00000] in <filename unknown>:0

and loads of other errors, which I can bore someone with if there is anyone out there.

I have to say Vuforia support is terrible. This is such an expensive product and support just sucks.

I look all over the forums at questions and there are virtually no helpful comments from anyone on the Vuforia team ever.

Really all I am after now is some way to just make Vuforia completely go away like it used to. So I can go to another scene that does not use Vuforia, and just not have to worry about Vuforia at all.

I just dont get why you guys are making this so damn hard now?

How can I have Multiple Vuforia Configurations with 6.2.10?

March 29, 2017 - 8:01am #2

Looking here (https://library.vuforia.com/articles/Solution/Unity-Configuration-Upgrade-Script-for-Vuforia-6-2-plus), this does seem to suggest that you can have multiple configuration files because of the CreateConfigurationForAllScenes method. But since there is no field in ARCamera for a configuration file, I assume that Vuforia searches 'Resources' for a file called 'Configuration_[SceneName]'.

If thats the case, thats a real pain in the butt, firstly because it means you have to maintain config settings for *every* scene that you want to have different settings, and keep the names the same as the Scene names. And secondly, you cannot have different settings for the same scene, based on the capabilities of the users device.

I read somewhere else that changing the settings at runtime can be done with a hint, but this has to be done before Vuforia initializes, so that would mean maintaining a seperate library of assets that contained some type of SceneSettings assets that could tell Vuforia what settings you want before the scene loads. Again a real pain.

Why not just have a field in the ARCamera component that can take a configuration asset and a property that can set one (and adjust Vuforia accordingly) at run time?

I'm also concerned that since the 'new way' seems to be to have Vuforia initialized all the time, rather than just for the scenes that need it, that I am going to have issues getting it to release the camera so the user can take a photo, for example.

Log in or register to post comments