C# Class NavMeshHelper, NavMeshHelper

This class represents a tool that helps to prepare the scene to NavMesh baking. It will generate clone objects from colliders already in the scene. These clone objects will contain the renderer generated from the collider shape. Unity NavMesh baking works upon Renderers, so colliders are ignored. This tool fulfil the need of using only colliders for NavMesh baking. Read the instructions for more information.
Inheritance: EditorWindow
显示文件 Open project: garcialuigi/NavMeshHelper Class Usage Examples

Private Methods

Method Description
BackToNormalMode ( ) : void

Go back to normal mode. (From BakeMode to NormalMode) Enable all the renderers that were disabled by the BakeMode setup. Destroy the temp/fake/clone objects. Go back to the scene's normal setup.

GenerateRendererObject ( Collider theCollider ) : GameObject

Generate an object with a renderer based on a collider. The method accepts: BoxCollider, CapsuleCollider, SphereCollider and MeshCollider.

OnGUI ( ) : void
SetDefaultMaterialReference ( ) : void

Called by the GenerateRendererObject method. This is a hack to get the diffuse material and store it. This material will be used to generate objects from a MeshCollider.

SetupNavMeshBakeMode ( ) : void

Setup the Bake Mode. Hide all the renderers in the scene, and generate all the clone/fake objects. Keep the original object's static flags and navmesh area setup, and configure it on the clone/fake.

ShowWindow ( ) : void