NullReferenceException: Object reference not set to an instance of an object when trying to create AR project with Vuforia
Hi, I'm trying to create a simple AR project using the steps in this tutorial : http://www.justapixel.co.uk/how-to-make-an-ar-app-in-5-minutes-with-unity-and-vuforia/
When I hit the play mode I get 5 errors:
Here is my TurnOffBehaviour.cs : sing UnityEngine;
namespace Vuforia { ///
/// A utility behaviour to disable rendering of a game object at run time. /// public class TurnOffBehaviour : TurnOffAbstractBehaviour { #region UNITY_MONOBEHAVIOUR_METHODS
void Awake()
{
if (VuforiaRuntimeUtilities.IsVuforiaEnabled())
{
// We remove the mesh components at run-time only, but keep them for
// visualization when running in the editor:
MeshRenderer targetMeshRenderer = this.GetComponent<MeshRenderer>();
Destroy(targetMeshRenderer);
MeshFilter targetMesh = this.GetComponent<MeshFilter>();
Destroy(targetMesh);
}
}
#endregion // UNITY_MONOBEHAVIOUR_METHODS
}
}
I haven't done or edited anything. All I did is following the steps of the tutorial. What's wrong and how can I fix this? I'm using Unity 5.3.2f1 (32-bits) and Vuforia 5.0.10 (That's the only SDK available now).
I would really appreciate any help!
Answer by majeric · Mar 21, 2016 at 06:52 PM
@FireofLife , Did you ever solve this? I'm having a similar problem.
Answer by marcelof00 · Mar 31, 2016 at 06:43 AM
Can you please provide me with a link where I can download the SDK for Unity version 5.0.10?
Thanks for your reply! Unfortunately, Vuforia does not provide access to previous releases. Do you have a copy of the SD$$anonymous$$ for Unity "version 5.0.10" ?
Answer by Lucas7CL · Mar 31, 2016 at 08:12 PM
Have you set the Image Target properly? It looks like Vuforia has not instantiated object.... send print screen of unity, selecting the Game Object Image Target to check it.