Jump to content

Unity NullReferenceException can't find shader


Recommended Posts


I'm getting an error and application quits immediatly:

NullReferenceException: Object reference not set to an instance of an object
Vive.Plugin.SR.ViveSR_DualCameraImagePlane.OnApplicationQuit () (at Assets/ViveSR/Scripts/ViveSR_DualCameraImagePlane.cs:655)

I'm using Unity 2019.3.13f1 and SRSDK running the ViveSR_sample scene. Has anyone else experienced this?


Link to comment
Share on other sites

  • 2 months later...
  • 11 months later...

NullReferenceException means that you are trying to use a reference variable whose value is Nothing/null . When the value is Nothing/null for the reference variable, which means that it is not actually holding a reference to an instance of any object that exists on the heap.

string str = null;

Above c# code throws a NullReferenceException at the second line because you can't call the instance method ToUpper() on a string reference pointing to null. So, check your code once again.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...