163 lines
7.2 KiB
C#
163 lines
7.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine.AI
|
|
{
|
|
// Token: 0x020001C8 RID: 456
|
|
public static class NavMeshBuilder
|
|
{
|
|
// Token: 0x06002116 RID: 8470 RVA: 0x000271F8 File Offset: 0x000253F8
|
|
public static void CollectSources(Bounds includedWorldBounds, int includedLayerMask, NavMeshCollectGeometry geometry, int defaultArea, List<NavMeshBuildMarkup> markups, List<NavMeshBuildSource> results)
|
|
{
|
|
if (markups == null)
|
|
{
|
|
throw new ArgumentNullException("markups");
|
|
}
|
|
if (results == null)
|
|
{
|
|
throw new ArgumentNullException("results");
|
|
}
|
|
includedWorldBounds.extents = Vector3.Max(includedWorldBounds.extents, 0.001f * Vector3.one);
|
|
NavMeshBuildSource[] array = NavMeshBuilder.CollectSourcesInternal(includedLayerMask, includedWorldBounds, null, true, geometry, defaultArea, markups.ToArray());
|
|
results.Clear();
|
|
results.AddRange(array);
|
|
}
|
|
|
|
// Token: 0x06002117 RID: 8471 RVA: 0x00027270 File Offset: 0x00025470
|
|
public static void CollectSources(Transform root, int includedLayerMask, NavMeshCollectGeometry geometry, int defaultArea, List<NavMeshBuildMarkup> markups, List<NavMeshBuildSource> results)
|
|
{
|
|
if (markups == null)
|
|
{
|
|
throw new ArgumentNullException("markups");
|
|
}
|
|
if (results == null)
|
|
{
|
|
throw new ArgumentNullException("results");
|
|
}
|
|
NavMeshBuildSource[] array = NavMeshBuilder.CollectSourcesInternal(includedLayerMask, default(Bounds), root, false, geometry, defaultArea, markups.ToArray());
|
|
results.Clear();
|
|
results.AddRange(array);
|
|
}
|
|
|
|
// Token: 0x06002118 RID: 8472 RVA: 0x000272CC File Offset: 0x000254CC
|
|
private static NavMeshBuildSource[] CollectSourcesInternal(int includedLayerMask, Bounds includedWorldBounds, Transform root, bool useBounds, NavMeshCollectGeometry geometry, int defaultArea, NavMeshBuildMarkup[] markups)
|
|
{
|
|
return NavMeshBuilder.INTERNAL_CALL_CollectSourcesInternal(includedLayerMask, ref includedWorldBounds, root, useBounds, geometry, defaultArea, markups);
|
|
}
|
|
|
|
// Token: 0x06002119 RID: 8473
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern NavMeshBuildSource[] INTERNAL_CALL_CollectSourcesInternal(int includedLayerMask, ref Bounds includedWorldBounds, Transform root, bool useBounds, NavMeshCollectGeometry geometry, int defaultArea, NavMeshBuildMarkup[] markups);
|
|
|
|
// Token: 0x0600211A RID: 8474 RVA: 0x000272F4 File Offset: 0x000254F4
|
|
public static NavMeshData BuildNavMeshData(NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds, Vector3 position, Quaternion rotation)
|
|
{
|
|
if (sources == null)
|
|
{
|
|
throw new ArgumentNullException("sources");
|
|
}
|
|
return NavMeshBuilder.BuildNavMeshData(buildSettings, sources, localBounds, position, rotation, default(NavMeshBuildDebugSettings));
|
|
}
|
|
|
|
// Token: 0x0600211B RID: 8475 RVA: 0x00027330 File Offset: 0x00025530
|
|
private static NavMeshData BuildNavMeshData(NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds, Vector3 position, Quaternion rotation, NavMeshBuildDebugSettings debug)
|
|
{
|
|
if (sources == null)
|
|
{
|
|
throw new ArgumentNullException("sources");
|
|
}
|
|
NavMeshData navMeshData = new NavMeshData(buildSettings.agentTypeID);
|
|
navMeshData.position = position;
|
|
navMeshData.rotation = rotation;
|
|
NavMeshBuilder.UpdateNavMeshDataListInternal(navMeshData, buildSettings, sources, localBounds, debug);
|
|
return navMeshData;
|
|
}
|
|
|
|
// Token: 0x0600211C RID: 8476 RVA: 0x00027380 File Offset: 0x00025580
|
|
public static bool UpdateNavMeshData(NavMeshData data, NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds)
|
|
{
|
|
if (data == null)
|
|
{
|
|
throw new ArgumentNullException("data");
|
|
}
|
|
if (sources == null)
|
|
{
|
|
throw new ArgumentNullException("sources");
|
|
}
|
|
return NavMeshBuilder.UpdateNavMeshData(data, buildSettings, sources, localBounds, default(NavMeshBuildDebugSettings));
|
|
}
|
|
|
|
// Token: 0x0600211D RID: 8477 RVA: 0x000273D0 File Offset: 0x000255D0
|
|
private static bool UpdateNavMeshData(NavMeshData data, NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds, NavMeshBuildDebugSettings debug)
|
|
{
|
|
if (data == null)
|
|
{
|
|
throw new ArgumentNullException("data");
|
|
}
|
|
if (sources == null)
|
|
{
|
|
throw new ArgumentNullException("sources");
|
|
}
|
|
return NavMeshBuilder.UpdateNavMeshDataListInternal(data, buildSettings, sources, localBounds, debug);
|
|
}
|
|
|
|
// Token: 0x0600211E RID: 8478 RVA: 0x00027418 File Offset: 0x00025618
|
|
private static bool UpdateNavMeshDataListInternal(NavMeshData data, NavMeshBuildSettings buildSettings, object sources, Bounds localBounds, NavMeshBuildDebugSettings debug)
|
|
{
|
|
return NavMeshBuilder.INTERNAL_CALL_UpdateNavMeshDataListInternal(data, ref buildSettings, sources, ref localBounds, ref debug);
|
|
}
|
|
|
|
// Token: 0x0600211F RID: 8479
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern bool INTERNAL_CALL_UpdateNavMeshDataListInternal(NavMeshData data, ref NavMeshBuildSettings buildSettings, object sources, ref Bounds localBounds, ref NavMeshBuildDebugSettings debug);
|
|
|
|
// Token: 0x06002120 RID: 8480 RVA: 0x0002743C File Offset: 0x0002563C
|
|
public static AsyncOperation UpdateNavMeshDataAsync(NavMeshData data, NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds)
|
|
{
|
|
if (data == null)
|
|
{
|
|
throw new ArgumentNullException("data");
|
|
}
|
|
if (sources == null)
|
|
{
|
|
throw new ArgumentNullException("sources");
|
|
}
|
|
return NavMeshBuilder.UpdateNavMeshDataAsync(data, buildSettings, sources, localBounds, default(NavMeshBuildDebugSettings));
|
|
}
|
|
|
|
// Token: 0x06002121 RID: 8481 RVA: 0x0002748C File Offset: 0x0002568C
|
|
private static AsyncOperation UpdateNavMeshDataAsync(NavMeshData data, NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds, NavMeshBuildDebugSettings debug)
|
|
{
|
|
if (data == null)
|
|
{
|
|
throw new ArgumentNullException("data");
|
|
}
|
|
if (sources == null)
|
|
{
|
|
throw new ArgumentNullException("sources");
|
|
}
|
|
return NavMeshBuilder.UpdateNavMeshDataAsyncListInternal(data, buildSettings, sources, localBounds, debug);
|
|
}
|
|
|
|
// Token: 0x06002122 RID: 8482
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public static extern void Cancel(NavMeshData data);
|
|
|
|
// Token: 0x06002123 RID: 8483 RVA: 0x000274D4 File Offset: 0x000256D4
|
|
private static AsyncOperation UpdateNavMeshDataAsyncListInternal(NavMeshData data, NavMeshBuildSettings buildSettings, object sources, Bounds localBounds, NavMeshBuildDebugSettings debug)
|
|
{
|
|
return NavMeshBuilder.INTERNAL_CALL_UpdateNavMeshDataAsyncListInternal(data, ref buildSettings, sources, ref localBounds, ref debug);
|
|
}
|
|
|
|
// Token: 0x06002124 RID: 8484
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern AsyncOperation INTERNAL_CALL_UpdateNavMeshDataAsyncListInternal(NavMeshData data, ref NavMeshBuildSettings buildSettings, object sources, ref Bounds localBounds, ref NavMeshBuildDebugSettings debug);
|
|
}
|
|
}
|