ARDK2.5.2 VirtualStudio None Exception

Include the following details while filing a bug report (edit as applicable):

  • Issue category: ARDK Virtual Studio Tools
  • Host machine & OS version: Windows
  • ARDK version: 2.5.2
  • Unity version: 2021.3.26f1

Bug reproduction steps:

If you run UnityEditor with VirtualStudio set to None, the following error will occur.

System.EntryPointNotFoundException: _NARWorldTrackingConfiguration_Init assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Niantic.ARDK.AR.Configuration._NativeARWorldTrackingConfiguration._NARWorldTrackingConfiguration_Init()
  at Niantic.ARDK.AR.Configuration._NativeARWorldTrackingConfiguration..ctor () [0x00000] in D:\Git\2209_sentosa_app\Assets\ThirdParty\ARDK\AR\Configuration\_NativeARWorldTrackingConfiguration.cs:116 
  at Niantic.ARDK.AR.Configuration.ARWorldTrackingConfigurationFactory.Create (Niantic.ARDK.RuntimeEnvironment environment) [0x0001a] in D:\Git\2209_sentosa_app\Assets\ThirdParty\ARDK\AR\Configuration\ARWorldTrackingConfigurationFactory.cs:107 
  at Niantic.ARDK.AR.Configuration.ARWorldTrackingConfigurationFactory.Create () [0x00000] in D:\Git\2209_sentosa_app\Assets\ThirdParty\ARDK\AR\Configuration\ARWorldTrackingConfigurationFactory.cs:94 
  at Niantic.ARDK.Extensions.ARSessionManager.Run () [0x00013] in D:\Git\2209_sentosa_app\Assets\ThirdParty\ARDK\Extensions\ARSessionManager.cs:244 
  at Niantic.ARDK.Extensions.ARSessionManager.CreateAndRun () [0x0000e] in D:\Git\2209_sentosa_app\Assets\ThirdParty\ARDK\Extensions\ARSessionManager.cs:254 
  at Niantic.ARDK.Extensions.ARSessionManager+<>c__DisplayClass31_0.<ScheduleCreateAndRunOnNextUpdate>b__0 () [0x0001b] in D:\Git\2209_sentosa_app\Assets\ThirdParty\ARDK\Extensions\ARSessionManager.cs:159 
  at Niantic.ARDK.Utilities._CallbackQueue.ConsumeQueue () [0x00042] in D:\Git\2209_sentosa_app\Assets\ThirdParty\ARDK\Utilities\_CallbackQueue.cs:70  from context: 
UnityEngine.Debug:LogError (object)
Niantic.ARDK.Utilities.Logging.UnityARLogHandler:Error (string) (at Assets/ThirdParty/ARDK/Utilities/Logging/LogHandler/UnityARLogHandler.cs:41)
Niantic.ARDK.Utilities.Logging.ARLog:_Exception (System.Exception,object) (at Assets/ThirdParty/ARDK/Utilities/Logging/ARLog.cs:226)
Niantic.ARDK.Utilities._CallbackQueue:ConsumeQueue () (at Assets/ThirdParty/ARDK/Utilities/_CallbackQueue.cs:75)
Niantic.ARDK.Utilities._CallbackQueue:Update () (at Assets/ThirdParty/ARDK/Utilities/_CallbackQueue.cs:116)

Any solution?

Hi Megumin,

When running ARDK in the editor you would need mock mode in order for everything to run properly and simulate how your project would work when it’s built to a device. Is there a reason you need to run Virtual Studio with None selected?

Hi Jesus.Thank you

There are two reasons why you might want to set it to None.

・There is no need to display AR in a specific place this time
・I want to develop with a black background because it is difficult to see effects and colors

Hi Megumin,

When AR isn’t needed is it in the same Unity Scene where AR is also being used or is a new Scene being loaded all together? If so, I would recommend not using any AR managers in a scene that doesn’t need it.

If this is all the same scene then let me look into this a bit more and see what I can find out for you.

thankyou

I understand that.

But it’s not normal to get this error, is it?

Hi Megumin,

So regarding this issue, it does appear to be a limitation on ARDKs end. Getting that error when setting Virtual Studio to None is expected since it requires Mock mode to be able to run a session in Editor.

The best suggestion I can provide is pausing the AR Session when AR isn’t needed. You would have to do that in code by either attaching the functionality to a button or some other way depending on what fits your workflow best.