microsoft / RoomAliveToolkit

Other
714 stars 191 forks source link

NullReferenceException when running build #77

Open lilfighterr opened 6 years ago

lilfighterr commented 6 years ago

Hi,

When I build to a .exe file and run it, all I see is a black screen. The debugger picks up a NullReferenceException on two camera calls: image

image

Any suggestions on fixing this?

Thanks

thundercarrot commented 6 years ago

Not exactly, but probably some field in some component has not been set. Just to sanity check this, I would follow the Unity tutorial to the letter and see if you get the same error (I'm presuming here that this is not the tutorial-- correct me if wrong).

lilfighterr commented 6 years ago

I initially had the building problem mentioned in https://github.com/Microsoft/RoomAliveToolkit/issues/75 and fixed it by following jjhartmann's comment. When I built it, and ran it, it had the nullreferenceexception. I followed the Unity tutorial exactly and also retried it again from scratch. Still the same problem.

ahmedassal commented 6 years ago

I have the exact same problem after doing the exact same steps as @lilfighterr. Any suggestions??

By the way. I see the virtual texture rendered successfully but the virtuabl 3d object not rendered at all and I get this exception.

lilfighterr commented 6 years ago

@ahmedassal I fixed this by moving some of the code that is giving the problem into the Awake() function so that it initializes first. Seems to be working with no problems so far.