Forum rules - please read before posting.

RememberNavMesh2D null reference bug

edited August 2015 in Engine development
I think there is a null check missing in the RememberNavMesh2D script.

Problem:
When returning to a scene where Nav Mesh holes have not yet been added to the default mesh during play I'm seeing an exception on line 76. Which is also causing the camera load to fail and stay at 0,0.

Steps to reproduce:
Attach the RememberNavMesh2D to the default Nav Mesh, which should have no holes attached.
Load the scene but do not add any holes to the Nav Mesh during play.
Exit the scene.
Return to the scene.
The exception will be triggered and the camera will default to 0,0.

Workaround:
Adding
if (linkedIDs == nullreturn;
just before the for loop on line 76 seems to solve the problem.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.