h8man / NavMeshPlus

Unity NavMesh 2D Pathfinding
MIT License
1.82k stars 210 forks source link

Error when selecting Navigation Surface object and no navmesh showing up #200

Closed Invisible99 closed 5 months ago

Invisible99 commented 5 months ago

When I add the package into my project I can't see the navmesh because the gizmo seems to be broken. I also see following error NullReferenceException: Object reference not set to an instance of an object NavMeshPlus.Components.Editors.NavMeshSurfaceEditor.RenderBoxGizmoSelected (NavMeshPlus.Components.NavMeshSurface navSurface, UnityEditor.GizmoType gizmoType) (at Packages/com.h8man.2d.navmeshplus/NavMeshComponents/Editor/NavMeshSurfaceEditor.cs:310) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

h8man commented 5 months ago

What version of unity you are using?

Invisible99 commented 5 months ago

2021.3.34f1

h8man commented 5 months ago

Unity doesn't support this version, and I dropped support in package
"name": "com.h8man.2d.navmeshplus", "displayName": "NavMeshPlus", "version": "0.2.22", "unity": "2022.3",

You can revert latest changes in that particular spot.

h8man commented 5 months ago

Will it work for you?

Invisible99 commented 5 months ago

Can't seem to make that work

h8man commented 5 months ago

Can you copy sources and revert changes in this file NavMeshComponents/Editor/NavMeshSurfaceEditor.cs from this commit: https://github.com/h8man/NavMeshPlus/commit/dd2842a593ef27ad6fa60d953208346404517743#diff-917dddfccffca5419cc97ca5f144edfd0157a92803a63e8fda8571e8fdf6f11f

Invisible99 commented 5 months ago

That worked thank you very much!

ConanGentleman commented 4 months ago

It methods won't work for me. version: 2021.3.14f1