public static void Collect(ref List <NavMeshBuildSource> sources)
 {
     sources.Clear();
     for (int index = 0; index < NavMeshBuildTag._meshes.Count; ++index)
     {
         NavMeshBuildTag.MeshInfo mesh = NavMeshBuildTag._meshes[index];
         if (mesh != null)
         {
             Mesh sharedMesh = mesh.Filter.get_sharedMesh();
             if (!Object.op_Equality((Object)sharedMesh, (Object)null))
             {
                 NavMeshBuildSource navMeshBuildSource = (NavMeshBuildSource)null;
                 ((NavMeshBuildSource) ref navMeshBuildSource).set_shape((NavMeshBuildSourceShape)0);
                 ((NavMeshBuildSource) ref navMeshBuildSource).set_sourceObject((Object)sharedMesh);
                 ((NavMeshBuildSource) ref navMeshBuildSource).set_transform(((Component)mesh.Filter).get_transform().get_localToWorldMatrix());
                 ((NavMeshBuildSource) ref navMeshBuildSource).set_area(mesh.Area);
                 sources.Add(navMeshBuildSource);
             }
         }
     }
     for (int index = 0; index < NavMeshBuildTag._terrains.Count; ++index)
     {
         NavMeshBuildTag.TerrainInfo terrain = NavMeshBuildTag._terrains[index];
         if (terrain != null)
         {
             NavMeshBuildSource navMeshBuildSource = (NavMeshBuildSource)null;
             ((NavMeshBuildSource) ref navMeshBuildSource).set_shape((NavMeshBuildSourceShape)1);
             ((NavMeshBuildSource) ref navMeshBuildSource).set_sourceObject((Object)terrain.Terrain.get_terrainData());
             ((NavMeshBuildSource) ref navMeshBuildSource).set_transform(Matrix4x4.TRS(((Component)terrain.Terrain).get_transform().get_position(), Quaternion.get_identity(), Vector3.get_one()));
             ((NavMeshBuildSource) ref navMeshBuildSource).set_area(terrain.Area);
             sources.Add(navMeshBuildSource);
         }
     }
 }
        private void OnEnable()
        {
            MeshFilter component1 = (MeshFilter)((Component)this).GetComponent <MeshFilter>();

            if (Object.op_Inequality((Object)component1, (Object)null))
            {
                NavMeshBuildTag.MeshInfo meshInfo = new NavMeshBuildTag.MeshInfo(component1, this._areaID);
                NavMeshBuildTag._meshes.Add(meshInfo);
            }
            Terrain component2 = (Terrain)((Component)this).GetComponent <Terrain>();

            if (!Object.op_Inequality((Object)component2, (Object)null))
            {
                return;
            }
            NavMeshBuildTag.TerrainInfo terrainInfo = new NavMeshBuildTag.TerrainInfo(component2, this._areaID);
            NavMeshBuildTag._terrains.Add(terrainInfo);
        }