Topic locked

Setting licence key at runtime

December 14, 2021 - 8:04am #3

I'm in the process of upgrading an older project using Vuforia 8.3.x to 10.3.2.

 

The following code to set the licence key at runtime doesn't work any longer with 10.3.2:

VuforiaConfiguration.Instance.Vuforia.LicenseKey  = "****";

The code is definitely correct, if i copy it from this code line into the Vuforia configuration, it works.

 

Is this still the correct property? If yes, is it possible that the code is executed too late? But even if i move it to the top in the script execution order, it still doesn't work (= licence not detected and Vuforia watermark visible).

 

 

 

 

 

Setting licence key at runtime

December 16, 2021 - 6:20am #2

Hello,

The 10.0 Unity API reference documentation specifically mentions the following:

"The license key can only be changed before the first scene is loaded, e.g. with the RuntimeInitializeOnLoadMethod-attribute"

Can you confirm that you're doing the same?

Kind regards,

Dave Downing

Technical Support

Setting licence key at runtime

December 16, 2021 - 12:10pm #1

Thanks for the response.

 

I totally missed that part of the documentation. I can't try it right away, but it sounds like it will work.

I will report back at the beginning of the new year :)

 

 

Topic locked