Log in or register to post comments

Vuforia.Runtime doesn't contain a definition for "InitializationState"

July 5, 2018 - 3:07pm #1

I'm in Unity 2018.1.0f2 and have the latest version of Vuforia Core Kit.

Right from the get-go after downloading Vuforia Core Kit from the Asset Store I get this error:

Assets/SamplesResources/VuforiaSamplesUI/Scripts/SamplesAboutScreenInfo.cs(77,58): error CS1061: Type `Vuforia.VuforiaRuntime' does not contain a definition for `InitializationState' and no extension method `InitializationState' of type `Vuforia.VuforiaRuntime' could be found. Are you missing an assembly reference?

I was able to solve the error by editing the code to fit the Vuforia.Runtime simplified definition.

The original code:

string vuforia = Vuforia.VuforiaRuntime.Instance.InitializationState != Vuforia.VuforiaRuntime.InitState.NOT_INITIALIZED

                                ? "<color=green>Yes</color>"

                                : "<color=red>No (enable Vuforia in XR Settings)</color>";

Modified code:

string vuforia = Vuforia.VuforiaRuntime.Instance.HasInitialized != !Vuforia.VuforiaRuntime.Instance.HasInitialized

                                ? "<color=green>Yes</color>"

                                : "<color=red>No (enable Vuforia in XR Settings)</color>";

I think this fixed it but I'm not certain, but it seems like it could be something like this depending how Vuforia.Runtime is setup now.

 

Thanks!

Vuforia.Runtime doesn't contain a definition for "InitializationState"

July 5, 2018 - 4:59pm #2

Hello wderstine,

Have you updated to the latest version of the Vuforia SDK in this version of Unity? If you've updated to the latest samples, they will require Vuforia 7.2.20. You can download this in Unity by opening the Vuforia Configuration and clicking on the link that should appear by the version number.

Thanks,

Vuforia Engine Support

Log in or register to post comments