Forum rules - please read before posting.

Bug: NavMeshBase hiding the renderer before it's been set.

In the file NavMeshBase.cs the code to hide the renderer is before the code to get the renderer component, leading to the navmesh segments not hiding on play.
I temp fixed this myself by changing:

"
(disableRenderer)
{
    Hide ();
}

_collider = GetComponent <Collider>();
_meshRenderer = GetComponent <MeshRenderer>();
_meshCollider = GetComponent <MeshCollider>();
_meshFilter = GetComponent <MeshFilter>();

"

into:

"
_collider = GetComponent <Collider>();
_meshRenderer = GetComponent <MeshRenderer>();
_meshCollider = GetComponent <MeshCollider>();
_meshFilter = GetComponent <MeshFilter>();

if (disableRenderer)
{
    Hide ();
}
"

I don't know when this problem started (I think I remember it working correctly at one point) or how important this is. Hope I'm not being too picky. 
Thanks,
Robb.

Comments

  • Perhaps due to a change in Unity - what's your version?

    It shouldn't matter which way around it is, but it won't do any harm to make the change official.
  • I can confirm the issue and the workaround in Unity 2017.3.1f1, Adventure Creator 1.61.2
  • The change will be made official in the upcoming v1.62.0 update.
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.