onejs-core 0.3.23 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/Assemblies/UnityEditor.CoreModule.d.ts +32614 -0
- package/definitions/Assemblies/UnityEngine.AIModule.d.ts +998 -0
- package/definitions/Assemblies/UnityEngine.AnimationModule.d.ts +3308 -0
- package/definitions/Assemblies/UnityEngine.AssetBundleModule.d.ts +337 -0
- package/definitions/Assemblies/UnityEngine.AudioModule.d.ts +1154 -0
- package/definitions/Assemblies/UnityEngine.TerrainModule.d.ts +1270 -0
- package/definitions/Assemblies/UnityEngine.UnityAnalyticsCommonModule.d.ts +274 -0
- package/definitions/Assemblies/index.d.ts +8 -1
- package/package.json +1 -1
- package/scripts/onejs-tw-config.cjs +2 -1
|
@@ -0,0 +1,998 @@
|
|
|
1
|
+
|
|
2
|
+
declare namespace CS {
|
|
3
|
+
// const __keep_incompatibility: unique symbol;
|
|
4
|
+
//
|
|
5
|
+
// interface $Ref<T> {
|
|
6
|
+
// value: T
|
|
7
|
+
// }
|
|
8
|
+
// namespace System {
|
|
9
|
+
// interface Array$1<T> extends System.Array {
|
|
10
|
+
// get_Item(index: number):T;
|
|
11
|
+
//
|
|
12
|
+
// set_Item(index: number, value: T):void;
|
|
13
|
+
// }
|
|
14
|
+
// }
|
|
15
|
+
// interface $Task<T> {}
|
|
16
|
+
namespace UnityEngine.Experimental.AI {
|
|
17
|
+
/** Represents a compact identifier for the data of a NavMesh node.
|
|
18
|
+
*/
|
|
19
|
+
class PolygonId extends System.ValueType implements System.IEquatable$1<UnityEngine.Experimental.AI.PolygonId>
|
|
20
|
+
{
|
|
21
|
+
protected [__keep_incompatibility]: never;
|
|
22
|
+
/** Returns true if the PolygonId has been created empty and has never pointed to any node in the NavMesh.
|
|
23
|
+
*/
|
|
24
|
+
public IsNull () : boolean
|
|
25
|
+
public static op_Equality ($x: UnityEngine.Experimental.AI.PolygonId, $y: UnityEngine.Experimental.AI.PolygonId) : boolean
|
|
26
|
+
public static op_Inequality ($x: UnityEngine.Experimental.AI.PolygonId, $y: UnityEngine.Experimental.AI.PolygonId) : boolean
|
|
27
|
+
/** Returns true if two PolygonId objects refer to the same NavMesh node.
|
|
28
|
+
*/
|
|
29
|
+
public Equals ($rhs: UnityEngine.Experimental.AI.PolygonId) : boolean
|
|
30
|
+
/** Returns true if two PolygonId objects refer to the same NavMesh node.
|
|
31
|
+
*/
|
|
32
|
+
public Equals ($obj: any) : boolean
|
|
33
|
+
}
|
|
34
|
+
/** A world position that is guaranteed to be on the surface of the NavMesh.
|
|
35
|
+
*/
|
|
36
|
+
class NavMeshLocation extends System.ValueType
|
|
37
|
+
{
|
|
38
|
+
protected [__keep_incompatibility]: never;
|
|
39
|
+
/** Unique identifier for the node in the NavMesh to which the world position has been mapped.
|
|
40
|
+
*/
|
|
41
|
+
public get polygon(): UnityEngine.Experimental.AI.PolygonId;
|
|
42
|
+
/** A world position that sits precisely on the surface of the NavMesh or along its links.
|
|
43
|
+
*/
|
|
44
|
+
public get position(): UnityEngine.Vector3;
|
|
45
|
+
}
|
|
46
|
+
/** Bit flags representing the resulting state of NavMeshQuery operations.
|
|
47
|
+
*/
|
|
48
|
+
enum PathQueryStatus
|
|
49
|
+
{ Failure = -2147483648, Success = 1073741824, InProgress = 536870912, StatusDetailMask = 16777215, WrongMagic = 1, WrongVersion = 2, OutOfMemory = 4, InvalidParam = 8, BufferTooSmall = 16, OutOfNodes = 32, PartialResult = 64 }
|
|
50
|
+
/** The types of nodes in the navigation data.
|
|
51
|
+
*/
|
|
52
|
+
enum NavMeshPolyTypes
|
|
53
|
+
{ Ground = 0, OffMeshConnection = 1 }
|
|
54
|
+
/** Assembles together a collection of NavMesh surfaces and links that are used as a whole for performing navigation operations.
|
|
55
|
+
*/
|
|
56
|
+
class NavMeshWorld extends System.ValueType
|
|
57
|
+
{
|
|
58
|
+
protected [__keep_incompatibility]: never;
|
|
59
|
+
/** Returns true if the NavMeshWorld has been properly initialized.
|
|
60
|
+
*/
|
|
61
|
+
public IsValid () : boolean
|
|
62
|
+
/** Returns a reference to the single NavMeshWorld that can currently exist and be used in Unity.
|
|
63
|
+
*/
|
|
64
|
+
public static GetDefaultWorld () : UnityEngine.Experimental.AI.NavMeshWorld
|
|
65
|
+
/** Tells the NavMesh world to halt any changes until the specified job is completed.
|
|
66
|
+
* @param $job The job that needs to be completed before the NavMesh world can be modified in any way.
|
|
67
|
+
*/
|
|
68
|
+
public AddDependency ($job: Unity.Jobs.JobHandle) : void
|
|
69
|
+
}
|
|
70
|
+
/** Object used for doing navigation operations in a NavMeshWorld.
|
|
71
|
+
*/
|
|
72
|
+
class NavMeshQuery extends System.ValueType implements System.IDisposable
|
|
73
|
+
{
|
|
74
|
+
protected [__keep_incompatibility]: never;
|
|
75
|
+
/** Destroys the NavMeshQuery and deallocates all memory used by it.
|
|
76
|
+
*/
|
|
77
|
+
public Dispose () : void
|
|
78
|
+
public BeginFindPath ($start: UnityEngine.Experimental.AI.NavMeshLocation, $end: UnityEngine.Experimental.AI.NavMeshLocation, $areaMask?: number, $costs?: Unity.Collections.NativeArray$1<number>) : UnityEngine.Experimental.AI.PathQueryStatus
|
|
79
|
+
/** Continues a path search that is in progress.
|
|
80
|
+
* @param $iterations Maximum number of nodes to be traversed by the search algorithm during this call.
|
|
81
|
+
* @param $iterationsPerformed Outputs the actual number of nodes that have been traversed during this call.
|
|
82
|
+
* @returns InProgress if the search needs to continue further by calling UpdateFindPath again.
|
|
83
|
+
Success if the search is completed and a path has been found or not.
|
|
84
|
+
Failure if the search for the desired position could not be completed because the NavMesh has changed significantly since the search was initiated.
|
|
85
|
+
Additionally the returned value can contain the OutOfNodes flag when the pathNodePoolSize parameter for the NavMeshQuery initialization was not large enough to accommodate the search space.
|
|
86
|
+
*/
|
|
87
|
+
public UpdateFindPath ($iterations: number, $iterationsPerformed: $Ref<number>) : UnityEngine.Experimental.AI.PathQueryStatus
|
|
88
|
+
/** Obtains the number of nodes in the path that has been computed during a successful NavMeshQuery.UpdateFindPath operation.
|
|
89
|
+
* @param $pathSize A reference to an int which will be set to the number of NavMesh nodes in the found path.
|
|
90
|
+
* @returns Success when the number of nodes in the path was retrieved correctly.
|
|
91
|
+
PartialPath when a path was found but it falls short of the desired end location.
|
|
92
|
+
Failure when the path size can not be evaluated because the preceding call to UpdateFindPath was not successful.
|
|
93
|
+
*/
|
|
94
|
+
public EndFindPath ($pathSize: $Ref<number>) : UnityEngine.Experimental.AI.PathQueryStatus
|
|
95
|
+
public GetPathResult ($path: Unity.Collections.NativeSlice$1<UnityEngine.Experimental.AI.PolygonId>) : number
|
|
96
|
+
/** Returns true if the node referenced by the specified PolygonId is active in the NavMesh.
|
|
97
|
+
* @param $polygon Identifier of the NavMesh node to be checked.
|
|
98
|
+
*/
|
|
99
|
+
public IsValid ($polygon: UnityEngine.Experimental.AI.PolygonId) : boolean
|
|
100
|
+
/** Returns true if the node referenced by the PolygonId contained in the NavMeshLocation is active in the NavMesh.
|
|
101
|
+
* @param $location Location on the NavMesh to be checked. Same as checking location.polygon directly.
|
|
102
|
+
*/
|
|
103
|
+
public IsValid ($location: UnityEngine.Experimental.AI.NavMeshLocation) : boolean
|
|
104
|
+
/** Returns the identifier of the agent type the NavMesh was baked for or for which the link has been configured.
|
|
105
|
+
* @param $polygon Identifier of a node from a NavMesh surface or link.
|
|
106
|
+
* @returns Agent type identifier.
|
|
107
|
+
*/
|
|
108
|
+
public GetAgentTypeIdForPolygon ($polygon: UnityEngine.Experimental.AI.PolygonId) : number
|
|
109
|
+
/** Returns a valid NavMeshLocation for a position and a polygon provided by the user.
|
|
110
|
+
* @param $position World position of the NavMeshLocation to be created.
|
|
111
|
+
* @param $polygon Valid identifier for the NavMesh node.
|
|
112
|
+
* @returns Object containing the desired position and NavMesh node.
|
|
113
|
+
*/
|
|
114
|
+
public CreateLocation ($position: UnityEngine.Vector3, $polygon: UnityEngine.Experimental.AI.PolygonId) : UnityEngine.Experimental.AI.NavMeshLocation
|
|
115
|
+
/** Finds the closest point and PolygonId on the NavMesh for a given world position.
|
|
116
|
+
* @param $position World position for which the closest point on the NavMesh needs to be found.
|
|
117
|
+
* @param $extents Maximum distance, from the specified position, expanding along all three axes, within which NavMesh surfaces are searched.
|
|
118
|
+
* @param $agentTypeID Identifier for the agent type whose NavMesh surfaces should be selected for this operation. The Humanoid agent type exists for all NavMeshes and has an ID of 0. Other agent types can be defined manually through the Editor. A separate NavMesh surface needs to be baked for each agent type.
|
|
119
|
+
* @param $areaMask Bitmask used to represent areas of the NavMesh that should (value of 1) or shouldn't (values of 0) be sampled. This parameter is optional and defaults to NavMesh.AllAreas if unspecified. Additional resources:.
|
|
120
|
+
* @returns An object with position and valid PolygonId - when a point on the NavMesh has been found.
|
|
121
|
+
An invalid object - when no NavMesh surface with the desired features has been found within the search area. Additional resources: NavMeshQuery.IsValid.
|
|
122
|
+
*/
|
|
123
|
+
public MapLocation ($position: UnityEngine.Vector3, $extents: UnityEngine.Vector3, $agentTypeID: number, $areaMask?: number) : UnityEngine.Experimental.AI.NavMeshLocation
|
|
124
|
+
public MoveLocations ($locations: Unity.Collections.NativeSlice$1<UnityEngine.Experimental.AI.NavMeshLocation>, $targets: Unity.Collections.NativeSlice$1<UnityEngine.Vector3>, $areaMasks: Unity.Collections.NativeSlice$1<number>) : void
|
|
125
|
+
public MoveLocationsInSameAreas ($locations: Unity.Collections.NativeSlice$1<UnityEngine.Experimental.AI.NavMeshLocation>, $targets: Unity.Collections.NativeSlice$1<UnityEngine.Vector3>, $areaMask?: number) : void
|
|
126
|
+
/** Translates a NavMesh location to another position without losing contact with the surface.
|
|
127
|
+
* @param $location Position to be moved across the NavMesh surface.
|
|
128
|
+
* @param $target World position you require the agent to move to.
|
|
129
|
+
* @param $areaMask Bitmask with values of 1 set at the indices corresponding to areas that can be traversed, and with values of 0 for areas that should not be traversed. This parameter can be omitted, in which case it defaults to NavMesh.AllAreas. Additional resources:.
|
|
130
|
+
* @returns A new location on the NavMesh placed as closely as possible to the specified target position.
|
|
131
|
+
The start location is returned when that start is inside an area which is not allowed by the areaMask.
|
|
132
|
+
*/
|
|
133
|
+
public MoveLocation ($location: UnityEngine.Experimental.AI.NavMeshLocation, $target: UnityEngine.Vector3, $areaMask?: number) : UnityEngine.Experimental.AI.NavMeshLocation
|
|
134
|
+
/** Obtains the end points of the line segment common to two adjacent NavMesh nodes.
|
|
135
|
+
* @param $polygon First NavMesh node.
|
|
136
|
+
* @param $neighbourPolygon Second NavMesh node.
|
|
137
|
+
* @param $left One of the world points for the resulting separation edge which must be passed through when traversing between the two specified nodes. This point is the left side of the edge when traversing from the first node to the second.
|
|
138
|
+
* @param $right One of the world points for the resulting separation edge which must be passed through when traversing between the two specified nodes. This point is the right side of the edge when traversing from the first node to the second.
|
|
139
|
+
* @returns True if a connection exists between the two NavMesh nodes.
|
|
140
|
+
False if no connection exists between the two NavMesh nodes.
|
|
141
|
+
*/
|
|
142
|
+
public GetPortalPoints ($polygon: UnityEngine.Experimental.AI.PolygonId, $neighbourPolygon: UnityEngine.Experimental.AI.PolygonId, $left: $Ref<UnityEngine.Vector3>, $right: $Ref<UnityEngine.Vector3>) : boolean
|
|
143
|
+
/** Returns the transformation matrix of the NavMesh surface that contains the specified NavMesh node (Read Only).
|
|
144
|
+
* @param $polygon NavMesh node for which its owner's transform must be determined.
|
|
145
|
+
* @returns Transformation matrix for the surface owning the specified polygon.
|
|
146
|
+
Matrix4x4.identity when the NavMesh node is a.
|
|
147
|
+
*/
|
|
148
|
+
public PolygonLocalToWorldMatrix ($polygon: UnityEngine.Experimental.AI.PolygonId) : UnityEngine.Matrix4x4
|
|
149
|
+
/** Returns the inverse transformation matrix of the NavMesh surface that contains the specified NavMesh node (Read Only).
|
|
150
|
+
* @param $polygon NavMesh node for which its owner's inverse transform must be determined.
|
|
151
|
+
* @returns Inverse transformation matrix of the surface owning the specified polygon.
|
|
152
|
+
Matrix4x4.identity when the NavMesh node is a.
|
|
153
|
+
*/
|
|
154
|
+
public PolygonWorldToLocalMatrix ($polygon: UnityEngine.Experimental.AI.PolygonId) : UnityEngine.Matrix4x4
|
|
155
|
+
/** Returns whether the NavMesh node is a polygon or a link.
|
|
156
|
+
* @param $polygon Identifier of a node from a NavMesh surface or link.
|
|
157
|
+
* @returns Ground when the node is a polygon on a NavMesh surface.
|
|
158
|
+
OffMeshConnection when the node is a.
|
|
159
|
+
*/
|
|
160
|
+
public GetPolygonType ($polygon: UnityEngine.Experimental.AI.PolygonId) : UnityEngine.Experimental.AI.NavMeshPolyTypes
|
|
161
|
+
public Raycast ($hit: $Ref<UnityEngine.AI.NavMeshHit>, $start: UnityEngine.Experimental.AI.NavMeshLocation, $targetPosition: UnityEngine.Vector3, $areaMask?: number, $costs?: Unity.Collections.NativeArray$1<number>) : UnityEngine.Experimental.AI.PathQueryStatus
|
|
162
|
+
public Raycast ($hit: $Ref<UnityEngine.AI.NavMeshHit>, $path: Unity.Collections.NativeSlice$1<UnityEngine.Experimental.AI.PolygonId>, $pathCount: $Ref<number>, $start: UnityEngine.Experimental.AI.NavMeshLocation, $targetPosition: UnityEngine.Vector3, $areaMask?: number, $costs?: Unity.Collections.NativeArray$1<number>) : UnityEngine.Experimental.AI.PathQueryStatus
|
|
163
|
+
public GetEdgesAndNeighbors ($node: UnityEngine.Experimental.AI.PolygonId, $edgeVertices: Unity.Collections.NativeSlice$1<UnityEngine.Vector3>, $neighbors: Unity.Collections.NativeSlice$1<UnityEngine.Experimental.AI.PolygonId>, $edgeIndices: Unity.Collections.NativeSlice$1<number>, $verticesCount: $Ref<number>, $neighborsCount: $Ref<number>) : UnityEngine.Experimental.AI.PathQueryStatus
|
|
164
|
+
public constructor ($world: UnityEngine.Experimental.AI.NavMeshWorld, $allocator: Unity.Collections.Allocator, $pathNodePoolSize?: number)
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
namespace UnityEngine.AI {
|
|
168
|
+
/** Result information for NavMesh queries.
|
|
169
|
+
*/
|
|
170
|
+
class NavMeshHit extends System.ValueType
|
|
171
|
+
{
|
|
172
|
+
protected [__keep_incompatibility]: never;
|
|
173
|
+
/** Position of hit.
|
|
174
|
+
*/
|
|
175
|
+
public get position(): UnityEngine.Vector3;
|
|
176
|
+
public set position(value: UnityEngine.Vector3);
|
|
177
|
+
/** Normal at the point of hit.
|
|
178
|
+
*/
|
|
179
|
+
public get normal(): UnityEngine.Vector3;
|
|
180
|
+
public set normal(value: UnityEngine.Vector3);
|
|
181
|
+
/** Distance to the point of hit.
|
|
182
|
+
*/
|
|
183
|
+
public get distance(): number;
|
|
184
|
+
public set distance(value: number);
|
|
185
|
+
/** Mask specifying NavMesh area at point of hit.
|
|
186
|
+
*/
|
|
187
|
+
public get mask(): number;
|
|
188
|
+
public set mask(value: number);
|
|
189
|
+
/** Flag set when hit.
|
|
190
|
+
*/
|
|
191
|
+
public get hit(): boolean;
|
|
192
|
+
public set hit(value: boolean);
|
|
193
|
+
}
|
|
194
|
+
class NavMeshBuilder extends System.Object
|
|
195
|
+
{
|
|
196
|
+
protected [__keep_incompatibility]: never;
|
|
197
|
+
public static CollectSources ($includedWorldBounds: UnityEngine.Bounds, $includedLayerMask: number, $geometry: UnityEngine.AI.NavMeshCollectGeometry, $defaultArea: number, $generateLinksByDefault: boolean, $markups: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildMarkup>, $includeOnlyMarkedObjects: boolean, $results: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildSource>) : void
|
|
198
|
+
public static CollectSources ($includedWorldBounds: UnityEngine.Bounds, $includedLayerMask: number, $geometry: UnityEngine.AI.NavMeshCollectGeometry, $defaultArea: number, $markups: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildMarkup>, $results: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildSource>) : void
|
|
199
|
+
public static CollectSources ($root: UnityEngine.Transform, $includedLayerMask: number, $geometry: UnityEngine.AI.NavMeshCollectGeometry, $defaultArea: number, $generateLinksByDefault: boolean, $markups: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildMarkup>, $includeOnlyMarkedObjects: boolean, $results: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildSource>) : void
|
|
200
|
+
public static CollectSources ($root: UnityEngine.Transform, $includedLayerMask: number, $geometry: UnityEngine.AI.NavMeshCollectGeometry, $defaultArea: number, $markups: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildMarkup>, $results: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildSource>) : void
|
|
201
|
+
public static BuildNavMeshData ($buildSettings: UnityEngine.AI.NavMeshBuildSettings, $sources: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildSource>, $localBounds: UnityEngine.Bounds, $position: UnityEngine.Vector3, $rotation: UnityEngine.Quaternion) : UnityEngine.AI.NavMeshData
|
|
202
|
+
public static UpdateNavMeshData ($data: UnityEngine.AI.NavMeshData, $buildSettings: UnityEngine.AI.NavMeshBuildSettings, $sources: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildSource>, $localBounds: UnityEngine.Bounds) : boolean
|
|
203
|
+
public static UpdateNavMeshDataAsync ($data: UnityEngine.AI.NavMeshData, $buildSettings: UnityEngine.AI.NavMeshBuildSettings, $sources: System.Collections.Generic.List$1<UnityEngine.AI.NavMeshBuildSource>, $localBounds: UnityEngine.Bounds) : UnityEngine.AsyncOperation
|
|
204
|
+
public static Cancel ($data: UnityEngine.AI.NavMeshData) : void
|
|
205
|
+
}
|
|
206
|
+
/** Used for specifying the type of geometry to collect. Used with NavMeshBuilder.CollectSources.
|
|
207
|
+
*/
|
|
208
|
+
enum NavMeshCollectGeometry
|
|
209
|
+
{ RenderMeshes = 0, PhysicsColliders = 1 }
|
|
210
|
+
/** The NavMesh build markup allows you to control how certain objects are treated during the NavMesh build process, specifically when collecting sources for building.
|
|
211
|
+
*/
|
|
212
|
+
class NavMeshBuildMarkup extends System.ValueType
|
|
213
|
+
{
|
|
214
|
+
protected [__keep_incompatibility]: never;
|
|
215
|
+
/** Use this to specify whether the area type of the GameObject and its children should be overridden by the area type specified in this struct.
|
|
216
|
+
*/
|
|
217
|
+
public get overrideArea(): boolean;
|
|
218
|
+
public set overrideArea(value: boolean);
|
|
219
|
+
/** The area type to use when override area is enabled.
|
|
220
|
+
*/
|
|
221
|
+
public get area(): number;
|
|
222
|
+
public set area(value: number);
|
|
223
|
+
/** Set this to true in order to enable the ignoreFromBuild property.
|
|
224
|
+
*/
|
|
225
|
+
public get overrideIgnore(): boolean;
|
|
226
|
+
public set overrideIgnore(value: boolean);
|
|
227
|
+
/** Use this to specify whether the GameObject and its children should be ignored.
|
|
228
|
+
*/
|
|
229
|
+
public get ignoreFromBuild(): boolean;
|
|
230
|
+
public set ignoreFromBuild(value: boolean);
|
|
231
|
+
/** Use this to specify whether the default links generation condition for the GameObject and its children should be overridden by the generateLinks option specified in this struct.
|
|
232
|
+
*/
|
|
233
|
+
public get overrideGenerateLinks(): boolean;
|
|
234
|
+
public set overrideGenerateLinks(value: boolean);
|
|
235
|
+
/** Use this to specify whether the GameObject and its children should be included in the link generation process.
|
|
236
|
+
*/
|
|
237
|
+
public get generateLinks(): boolean;
|
|
238
|
+
public set generateLinks(value: boolean);
|
|
239
|
+
/** Use this to specify if the GameObject's children also use these markup settings.
|
|
240
|
+
*/
|
|
241
|
+
public get applyToChildren(): boolean;
|
|
242
|
+
public set applyToChildren(value: boolean);
|
|
243
|
+
/** Use this to specify which GameObject (including the GameObject’s children) the markup should be applied to.
|
|
244
|
+
*/
|
|
245
|
+
public get root(): UnityEngine.Transform;
|
|
246
|
+
public set root(value: UnityEngine.Transform);
|
|
247
|
+
}
|
|
248
|
+
/** The input to the NavMesh builder is a list of NavMesh build sources.
|
|
249
|
+
*/
|
|
250
|
+
class NavMeshBuildSource extends System.ValueType
|
|
251
|
+
{
|
|
252
|
+
protected [__keep_incompatibility]: never;
|
|
253
|
+
/** Describes the local to world transformation matrix of the build source. That is, position and orientation and scale of the shape.
|
|
254
|
+
*/
|
|
255
|
+
public get transform(): UnityEngine.Matrix4x4;
|
|
256
|
+
public set transform(value: UnityEngine.Matrix4x4);
|
|
257
|
+
/** Describes the dimensions of the shape.
|
|
258
|
+
*/
|
|
259
|
+
public get size(): UnityEngine.Vector3;
|
|
260
|
+
public set size(value: UnityEngine.Vector3);
|
|
261
|
+
/** The type of the shape this source describes. Additional resources: NavMeshBuildSourceShape.
|
|
262
|
+
*/
|
|
263
|
+
public get shape(): UnityEngine.AI.NavMeshBuildSourceShape;
|
|
264
|
+
public set shape(value: UnityEngine.AI.NavMeshBuildSourceShape);
|
|
265
|
+
/** Describes the area type of the NavMesh surface for this object.
|
|
266
|
+
*/
|
|
267
|
+
public get area(): number;
|
|
268
|
+
public set area(value: number);
|
|
269
|
+
/** Enables the links generation for this object.
|
|
270
|
+
*/
|
|
271
|
+
public get generateLinks(): boolean;
|
|
272
|
+
public set generateLinks(value: boolean);
|
|
273
|
+
/** Describes the object referenced for Mesh and Terrain types of input sources.
|
|
274
|
+
*/
|
|
275
|
+
public get sourceObject(): UnityEngine.Object;
|
|
276
|
+
public set sourceObject(value: UnityEngine.Object);
|
|
277
|
+
/** Points to the owning component - if available, otherwise null.
|
|
278
|
+
*/
|
|
279
|
+
public get component(): UnityEngine.Component;
|
|
280
|
+
public set component(value: UnityEngine.Component);
|
|
281
|
+
}
|
|
282
|
+
/** Contains and represents NavMesh data.
|
|
283
|
+
*/
|
|
284
|
+
class NavMeshData extends UnityEngine.Object
|
|
285
|
+
{
|
|
286
|
+
protected [__keep_incompatibility]: never;
|
|
287
|
+
/** Returns the bounding volume of the input geometry used to build this NavMesh (Read Only).
|
|
288
|
+
*/
|
|
289
|
+
public get sourceBounds(): UnityEngine.Bounds;
|
|
290
|
+
/** Gets or sets the world space position of the NavMesh data.
|
|
291
|
+
*/
|
|
292
|
+
public get position(): UnityEngine.Vector3;
|
|
293
|
+
public set position(value: UnityEngine.Vector3);
|
|
294
|
+
/** Gets or sets the orientation of the NavMesh data.
|
|
295
|
+
*/
|
|
296
|
+
public get rotation(): UnityEngine.Quaternion;
|
|
297
|
+
public set rotation(value: UnityEngine.Quaternion);
|
|
298
|
+
public constructor ()
|
|
299
|
+
public constructor ($agentTypeID: number)
|
|
300
|
+
}
|
|
301
|
+
/** The NavMeshBuildSettings struct allows you to specify a collection of settings which describe the dimensions and limitations of a particular agent type.
|
|
302
|
+
*/
|
|
303
|
+
class NavMeshBuildSettings extends System.ValueType
|
|
304
|
+
{
|
|
305
|
+
protected [__keep_incompatibility]: never;
|
|
306
|
+
/** The agent type ID the NavMesh will be baked for.
|
|
307
|
+
*/
|
|
308
|
+
public get agentTypeID(): number;
|
|
309
|
+
public set agentTypeID(value: number);
|
|
310
|
+
/** The radius of the agent for baking in world units.
|
|
311
|
+
*/
|
|
312
|
+
public get agentRadius(): number;
|
|
313
|
+
public set agentRadius(value: number);
|
|
314
|
+
/** The height of the agent for baking in world units.
|
|
315
|
+
*/
|
|
316
|
+
public get agentHeight(): number;
|
|
317
|
+
public set agentHeight(value: number);
|
|
318
|
+
/** The maximum slope angle which is walkable (angle in degrees).
|
|
319
|
+
*/
|
|
320
|
+
public get agentSlope(): number;
|
|
321
|
+
public set agentSlope(value: number);
|
|
322
|
+
/** The maximum vertical step size an agent can take.
|
|
323
|
+
*/
|
|
324
|
+
public get agentClimb(): number;
|
|
325
|
+
public set agentClimb(value: number);
|
|
326
|
+
/** Maximum agent drop height.
|
|
327
|
+
*/
|
|
328
|
+
public get ledgeDropHeight(): number;
|
|
329
|
+
public set ledgeDropHeight(value: number);
|
|
330
|
+
/** Maximum agent jump distance.
|
|
331
|
+
*/
|
|
332
|
+
public get maxJumpAcrossDistance(): number;
|
|
333
|
+
public set maxJumpAcrossDistance(value: number);
|
|
334
|
+
/** The approximate minimum area of individual NavMesh regions.
|
|
335
|
+
*/
|
|
336
|
+
public get minRegionArea(): number;
|
|
337
|
+
public set minRegionArea(value: number);
|
|
338
|
+
/** Enables overriding the default voxel size. Additional resources: voxelSize.
|
|
339
|
+
*/
|
|
340
|
+
public get overrideVoxelSize(): boolean;
|
|
341
|
+
public set overrideVoxelSize(value: boolean);
|
|
342
|
+
/** Sets the voxel size in world length units.
|
|
343
|
+
*/
|
|
344
|
+
public get voxelSize(): number;
|
|
345
|
+
public set voxelSize(value: number);
|
|
346
|
+
/** Enables overriding the default tile size. Additional resources: tileSize.
|
|
347
|
+
*/
|
|
348
|
+
public get overrideTileSize(): boolean;
|
|
349
|
+
public set overrideTileSize(value: boolean);
|
|
350
|
+
/** Sets the tile size in voxel units.
|
|
351
|
+
*/
|
|
352
|
+
public get tileSize(): number;
|
|
353
|
+
public set tileSize(value: number);
|
|
354
|
+
/** The maximum number of worker threads that the build process can utilize when building a NavMesh with these settings.
|
|
355
|
+
*/
|
|
356
|
+
public get maxJobWorkers(): number;
|
|
357
|
+
public set maxJobWorkers(value: number);
|
|
358
|
+
public get preserveTilesOutsideBounds(): boolean;
|
|
359
|
+
public set preserveTilesOutsideBounds(value: boolean);
|
|
360
|
+
/** Enables the creation of additional data needed to determine the height at any position on the NavMesh more accurately.
|
|
361
|
+
*/
|
|
362
|
+
public get buildHeightMesh(): boolean;
|
|
363
|
+
public set buildHeightMesh(value: boolean);
|
|
364
|
+
/** Options for collecting debug data during the build process.
|
|
365
|
+
*/
|
|
366
|
+
public get debug(): UnityEngine.AI.NavMeshBuildDebugSettings;
|
|
367
|
+
public set debug(value: UnityEngine.AI.NavMeshBuildDebugSettings);
|
|
368
|
+
/** Validates the properties of NavMeshBuildSettings.
|
|
369
|
+
* @param $buildBounds Describes the volume to build NavMesh for.
|
|
370
|
+
* @returns The list of violated constraints.
|
|
371
|
+
*/
|
|
372
|
+
public ValidationReport ($buildBounds: UnityEngine.Bounds) : System.Array$1<string>
|
|
373
|
+
}
|
|
374
|
+
/** Level of obstacle avoidance.
|
|
375
|
+
*/
|
|
376
|
+
enum ObstacleAvoidanceType
|
|
377
|
+
{ NoObstacleAvoidance = 0, LowQualityObstacleAvoidance = 1, MedQualityObstacleAvoidance = 2, GoodQualityObstacleAvoidance = 3, HighQualityObstacleAvoidance = 4 }
|
|
378
|
+
/** Navigation mesh agent.
|
|
379
|
+
*/
|
|
380
|
+
class NavMeshAgent extends UnityEngine.Behaviour
|
|
381
|
+
{
|
|
382
|
+
protected [__keep_incompatibility]: never;
|
|
383
|
+
/** Gets or attempts to set the destination of the agent in world-space units.
|
|
384
|
+
*/
|
|
385
|
+
public get destination(): UnityEngine.Vector3;
|
|
386
|
+
public set destination(value: UnityEngine.Vector3);
|
|
387
|
+
/** Stop within this distance from the target position.
|
|
388
|
+
*/
|
|
389
|
+
public get stoppingDistance(): number;
|
|
390
|
+
public set stoppingDistance(value: number);
|
|
391
|
+
/** Access the current velocity of the NavMeshAgent component, or set a velocity to control the agent manually.
|
|
392
|
+
*/
|
|
393
|
+
public get velocity(): UnityEngine.Vector3;
|
|
394
|
+
public set velocity(value: UnityEngine.Vector3);
|
|
395
|
+
/** Gets or sets the simulation position of the navmesh agent.
|
|
396
|
+
*/
|
|
397
|
+
public get nextPosition(): UnityEngine.Vector3;
|
|
398
|
+
public set nextPosition(value: UnityEngine.Vector3);
|
|
399
|
+
/** Get the current steering target along the path. (Read Only)
|
|
400
|
+
*/
|
|
401
|
+
public get steeringTarget(): UnityEngine.Vector3;
|
|
402
|
+
/** The desired velocity of the agent including any potential contribution from avoidance. (Read Only)
|
|
403
|
+
*/
|
|
404
|
+
public get desiredVelocity(): UnityEngine.Vector3;
|
|
405
|
+
/** The distance between the agent's position and the destination on the current path. (Read Only)
|
|
406
|
+
*/
|
|
407
|
+
public get remainingDistance(): number;
|
|
408
|
+
/** The relative vertical displacement of the owning GameObject.
|
|
409
|
+
*/
|
|
410
|
+
public get baseOffset(): number;
|
|
411
|
+
public set baseOffset(value: number);
|
|
412
|
+
/** Is the agent currently positioned on an OffMeshLink? (Read Only)
|
|
413
|
+
*/
|
|
414
|
+
public get isOnOffMeshLink(): boolean;
|
|
415
|
+
/** The current OffMeshLinkData.
|
|
416
|
+
*/
|
|
417
|
+
public get currentOffMeshLinkData(): UnityEngine.AI.OffMeshLinkData;
|
|
418
|
+
/** The next OffMeshLinkData on the current path.
|
|
419
|
+
*/
|
|
420
|
+
public get nextOffMeshLinkData(): UnityEngine.AI.OffMeshLinkData;
|
|
421
|
+
/** Should the agent move across OffMeshLinks automatically?
|
|
422
|
+
*/
|
|
423
|
+
public get autoTraverseOffMeshLink(): boolean;
|
|
424
|
+
public set autoTraverseOffMeshLink(value: boolean);
|
|
425
|
+
/** Should the agent brake automatically to avoid overshooting the destination point?
|
|
426
|
+
*/
|
|
427
|
+
public get autoBraking(): boolean;
|
|
428
|
+
public set autoBraking(value: boolean);
|
|
429
|
+
/** Should the agent attempt to acquire a new path if the existing path becomes invalid?
|
|
430
|
+
*/
|
|
431
|
+
public get autoRepath(): boolean;
|
|
432
|
+
public set autoRepath(value: boolean);
|
|
433
|
+
/** Does the agent currently have a path? (Read Only)
|
|
434
|
+
*/
|
|
435
|
+
public get hasPath(): boolean;
|
|
436
|
+
/** Is a path in the process of being computed but not yet ready? (Read Only)
|
|
437
|
+
*/
|
|
438
|
+
public get pathPending(): boolean;
|
|
439
|
+
/** Is the current path stale. (Read Only)
|
|
440
|
+
*/
|
|
441
|
+
public get isPathStale(): boolean;
|
|
442
|
+
/** The status of the current path (complete, partial or invalid).
|
|
443
|
+
*/
|
|
444
|
+
public get pathStatus(): UnityEngine.AI.NavMeshPathStatus;
|
|
445
|
+
public get pathEndPosition(): UnityEngine.Vector3;
|
|
446
|
+
/** This property holds the stop or resume condition of the NavMesh agent.
|
|
447
|
+
*/
|
|
448
|
+
public get isStopped(): boolean;
|
|
449
|
+
public set isStopped(value: boolean);
|
|
450
|
+
/** Property to get and set the current path.
|
|
451
|
+
*/
|
|
452
|
+
public get path(): UnityEngine.AI.NavMeshPath;
|
|
453
|
+
public set path(value: UnityEngine.AI.NavMeshPath);
|
|
454
|
+
/** Returns the owning object of the NavMesh the agent is currently placed on (Read Only).
|
|
455
|
+
*/
|
|
456
|
+
public get navMeshOwner(): UnityEngine.Object;
|
|
457
|
+
/** The type ID for the agent.
|
|
458
|
+
*/
|
|
459
|
+
public get agentTypeID(): number;
|
|
460
|
+
public set agentTypeID(value: number);
|
|
461
|
+
/** Specifies which NavMesh areas are passable. Changing areaMask will make the path stale (see isPathStale).
|
|
462
|
+
*/
|
|
463
|
+
public get areaMask(): number;
|
|
464
|
+
public set areaMask(value: number);
|
|
465
|
+
/** Maximum movement speed when following a path.
|
|
466
|
+
*/
|
|
467
|
+
public get speed(): number;
|
|
468
|
+
public set speed(value: number);
|
|
469
|
+
/** Maximum turning speed in (deg/s) while following a path.
|
|
470
|
+
*/
|
|
471
|
+
public get angularSpeed(): number;
|
|
472
|
+
public set angularSpeed(value: number);
|
|
473
|
+
/** The maximum acceleration of an agent as it follows a path, given in units / sec^2.
|
|
474
|
+
*/
|
|
475
|
+
public get acceleration(): number;
|
|
476
|
+
public set acceleration(value: number);
|
|
477
|
+
/** Gets or sets whether the transform position is synchronized with the simulated agent position. The default value is true.
|
|
478
|
+
*/
|
|
479
|
+
public get updatePosition(): boolean;
|
|
480
|
+
public set updatePosition(value: boolean);
|
|
481
|
+
/** Should the agent update the transform orientation?
|
|
482
|
+
*/
|
|
483
|
+
public get updateRotation(): boolean;
|
|
484
|
+
public set updateRotation(value: boolean);
|
|
485
|
+
/** Allows you to specify whether the agent should be aligned to the up-axis of the NavMesh or link that it is placed on.
|
|
486
|
+
*/
|
|
487
|
+
public get updateUpAxis(): boolean;
|
|
488
|
+
public set updateUpAxis(value: boolean);
|
|
489
|
+
/** The avoidance radius for the agent.
|
|
490
|
+
*/
|
|
491
|
+
public get radius(): number;
|
|
492
|
+
public set radius(value: number);
|
|
493
|
+
/** The height of the agent for purposes of passing under obstacles, etc.
|
|
494
|
+
*/
|
|
495
|
+
public get height(): number;
|
|
496
|
+
public set height(value: number);
|
|
497
|
+
/** The level of quality of avoidance.
|
|
498
|
+
*/
|
|
499
|
+
public get obstacleAvoidanceType(): UnityEngine.AI.ObstacleAvoidanceType;
|
|
500
|
+
public set obstacleAvoidanceType(value: UnityEngine.AI.ObstacleAvoidanceType);
|
|
501
|
+
/** The avoidance priority level.
|
|
502
|
+
*/
|
|
503
|
+
public get avoidancePriority(): number;
|
|
504
|
+
public set avoidancePriority(value: number);
|
|
505
|
+
/** Is the agent currently bound to the navmesh? (Read Only)
|
|
506
|
+
*/
|
|
507
|
+
public get isOnNavMesh(): boolean;
|
|
508
|
+
/** Sets or updates the destination thus triggering the calculation for a new path.
|
|
509
|
+
* @param $target The target point to navigate to.
|
|
510
|
+
* @returns True if the destination was requested successfully, otherwise false.
|
|
511
|
+
*/
|
|
512
|
+
public SetDestination ($target: UnityEngine.Vector3) : boolean
|
|
513
|
+
/** Enables or disables the current off-mesh link.
|
|
514
|
+
* @param $activated Is the link activated?
|
|
515
|
+
*/
|
|
516
|
+
public ActivateCurrentOffMeshLink ($activated: boolean) : void
|
|
517
|
+
/** Completes the movement on the current OffMeshLink.
|
|
518
|
+
*/
|
|
519
|
+
public CompleteOffMeshLink () : void
|
|
520
|
+
/** Warps agent to the provided position.
|
|
521
|
+
* @param $newPosition New position to warp the agent to.
|
|
522
|
+
* @returns True if agent is successfully warped, otherwise false.
|
|
523
|
+
*/
|
|
524
|
+
public Warp ($newPosition: UnityEngine.Vector3) : boolean
|
|
525
|
+
/** Apply relative movement to current position.
|
|
526
|
+
* @param $offset The relative movement vector.
|
|
527
|
+
*/
|
|
528
|
+
public Move ($offset: UnityEngine.Vector3) : void
|
|
529
|
+
/** Clears the current path.
|
|
530
|
+
*/
|
|
531
|
+
public ResetPath () : void
|
|
532
|
+
/** Assign a new path to this agent.
|
|
533
|
+
* @param $path New path to follow.
|
|
534
|
+
* @returns True if the path is succesfully assigned.
|
|
535
|
+
*/
|
|
536
|
+
public SetPath ($path: UnityEngine.AI.NavMeshPath) : boolean
|
|
537
|
+
/** Locate the closest NavMesh edge.
|
|
538
|
+
* @param $hit Holds the properties of the resulting location.
|
|
539
|
+
* @returns True if a nearest edge is found.
|
|
540
|
+
*/
|
|
541
|
+
public FindClosestEdge ($hit: $Ref<UnityEngine.AI.NavMeshHit>) : boolean
|
|
542
|
+
/** Trace a straight path towards a target postion in the NavMesh without moving the agent.
|
|
543
|
+
* @param $targetPosition The desired end position of movement.
|
|
544
|
+
* @param $hit Properties of the obstacle detected by the ray (if any).
|
|
545
|
+
* @returns True if there is an obstacle between the agent and the target position, otherwise false.
|
|
546
|
+
*/
|
|
547
|
+
public Raycast ($targetPosition: UnityEngine.Vector3, $hit: $Ref<UnityEngine.AI.NavMeshHit>) : boolean
|
|
548
|
+
/** Calculate a path to a specified point and store the resulting path.
|
|
549
|
+
* @param $targetPosition The final position of the path requested.
|
|
550
|
+
* @param $path The resulting path.
|
|
551
|
+
* @returns True if either a complete or partial path is found. False otherwise.
|
|
552
|
+
*/
|
|
553
|
+
public CalculatePath ($targetPosition: UnityEngine.Vector3, $path: UnityEngine.AI.NavMeshPath) : boolean
|
|
554
|
+
/** Sample a position along the current path.
|
|
555
|
+
* @param $areaMask A bitfield mask specifying which NavMesh areas can be passed when tracing the path.
|
|
556
|
+
* @param $maxDistance Terminate scanning the path at this distance.
|
|
557
|
+
* @param $hit Holds the properties of the resulting location.
|
|
558
|
+
* @returns True if terminated before reaching the position at maxDistance, false otherwise.
|
|
559
|
+
*/
|
|
560
|
+
public SamplePathPosition ($areaMask: number, $maxDistance: number, $hit: $Ref<UnityEngine.AI.NavMeshHit>) : boolean
|
|
561
|
+
/** Sets the cost for traversing over areas of the area type.
|
|
562
|
+
* @param $areaIndex Area cost.
|
|
563
|
+
* @param $areaCost New cost for the specified area index.
|
|
564
|
+
*/
|
|
565
|
+
public SetAreaCost ($areaIndex: number, $areaCost: number) : void
|
|
566
|
+
/** Gets the cost for path calculation when crossing area of a particular type.
|
|
567
|
+
* @param $areaIndex Area Index.
|
|
568
|
+
* @returns Current cost for specified area index.
|
|
569
|
+
*/
|
|
570
|
+
public GetAreaCost ($areaIndex: number) : number
|
|
571
|
+
public constructor ()
|
|
572
|
+
}
|
|
573
|
+
/** State of OffMeshLink.
|
|
574
|
+
*/
|
|
575
|
+
class OffMeshLinkData extends System.ValueType
|
|
576
|
+
{
|
|
577
|
+
protected [__keep_incompatibility]: never;
|
|
578
|
+
/** Is link valid (Read Only).
|
|
579
|
+
*/
|
|
580
|
+
public get valid(): boolean;
|
|
581
|
+
/** Is link active (Read Only).
|
|
582
|
+
*/
|
|
583
|
+
public get activated(): boolean;
|
|
584
|
+
/** Link type specifier (Read Only).
|
|
585
|
+
*/
|
|
586
|
+
public get linkType(): UnityEngine.AI.OffMeshLinkType;
|
|
587
|
+
/** Link start world position (Read Only).
|
|
588
|
+
*/
|
|
589
|
+
public get startPos(): UnityEngine.Vector3;
|
|
590
|
+
/** Link end world position (Read Only).
|
|
591
|
+
*/
|
|
592
|
+
public get endPos(): UnityEngine.Vector3;
|
|
593
|
+
/** Get the object used to create the NavMesh link represented by the data in this struct.
|
|
594
|
+
*/
|
|
595
|
+
public get owner(): UnityEngine.Object;
|
|
596
|
+
}
|
|
597
|
+
/** Status of path.
|
|
598
|
+
*/
|
|
599
|
+
enum NavMeshPathStatus
|
|
600
|
+
{ PathComplete = 0, PathPartial = 1, PathInvalid = 2 }
|
|
601
|
+
/** A path as calculated by the navigation system.
|
|
602
|
+
*/
|
|
603
|
+
class NavMeshPath extends System.Object
|
|
604
|
+
{
|
|
605
|
+
protected [__keep_incompatibility]: never;
|
|
606
|
+
/** Corner points of the path. (Read Only)
|
|
607
|
+
*/
|
|
608
|
+
public get corners(): System.Array$1<UnityEngine.Vector3>;
|
|
609
|
+
/** Status of the path. (Read Only)
|
|
610
|
+
*/
|
|
611
|
+
public get status(): UnityEngine.AI.NavMeshPathStatus;
|
|
612
|
+
/** Calculate the corners for the path.
|
|
613
|
+
* @param $results Array to store path corners.
|
|
614
|
+
* @returns The number of corners along the path - including start and end points.
|
|
615
|
+
*/
|
|
616
|
+
public GetCornersNonAlloc ($results: System.Array$1<UnityEngine.Vector3>) : number
|
|
617
|
+
/** Erase all corner points from path.
|
|
618
|
+
*/
|
|
619
|
+
public ClearCorners () : void
|
|
620
|
+
public constructor ()
|
|
621
|
+
}
|
|
622
|
+
/** Shape of the obstacle.
|
|
623
|
+
*/
|
|
624
|
+
enum NavMeshObstacleShape
|
|
625
|
+
{ Capsule = 0, Box = 1 }
|
|
626
|
+
/** An obstacle for NavMeshAgents to avoid.
|
|
627
|
+
*/
|
|
628
|
+
class NavMeshObstacle extends UnityEngine.Behaviour
|
|
629
|
+
{
|
|
630
|
+
protected [__keep_incompatibility]: never;
|
|
631
|
+
/** Height of the obstacle's cylinder shape.
|
|
632
|
+
*/
|
|
633
|
+
public get height(): number;
|
|
634
|
+
public set height(value: number);
|
|
635
|
+
/** Radius of the obstacle's capsule shape.
|
|
636
|
+
*/
|
|
637
|
+
public get radius(): number;
|
|
638
|
+
public set radius(value: number);
|
|
639
|
+
/** Velocity at which the obstacle moves around the NavMesh.
|
|
640
|
+
*/
|
|
641
|
+
public get velocity(): UnityEngine.Vector3;
|
|
642
|
+
public set velocity(value: UnityEngine.Vector3);
|
|
643
|
+
/** Should this obstacle make a cut-out in the navmesh.
|
|
644
|
+
*/
|
|
645
|
+
public get carving(): boolean;
|
|
646
|
+
public set carving(value: boolean);
|
|
647
|
+
/** Should this obstacle be carved when it is constantly moving?
|
|
648
|
+
*/
|
|
649
|
+
public get carveOnlyStationary(): boolean;
|
|
650
|
+
public set carveOnlyStationary(value: boolean);
|
|
651
|
+
/** Threshold distance for updating a moving carved hole (when carving is enabled).
|
|
652
|
+
*/
|
|
653
|
+
public get carvingMoveThreshold(): number;
|
|
654
|
+
public set carvingMoveThreshold(value: number);
|
|
655
|
+
/** Time to wait until obstacle is treated as stationary (when carving and carveOnlyStationary are enabled).
|
|
656
|
+
*/
|
|
657
|
+
public get carvingTimeToStationary(): number;
|
|
658
|
+
public set carvingTimeToStationary(value: number);
|
|
659
|
+
/** The shape of the obstacle.
|
|
660
|
+
*/
|
|
661
|
+
public get shape(): UnityEngine.AI.NavMeshObstacleShape;
|
|
662
|
+
public set shape(value: UnityEngine.AI.NavMeshObstacleShape);
|
|
663
|
+
/** The center of the obstacle, measured in the object's local space.
|
|
664
|
+
*/
|
|
665
|
+
public get center(): UnityEngine.Vector3;
|
|
666
|
+
public set center(value: UnityEngine.Vector3);
|
|
667
|
+
/** The size of the obstacle, measured in the object's local space.
|
|
668
|
+
*/
|
|
669
|
+
public get size(): UnityEngine.Vector3;
|
|
670
|
+
public set size(value: UnityEngine.Vector3);
|
|
671
|
+
public constructor ()
|
|
672
|
+
}
|
|
673
|
+
/** Link type specifier.
|
|
674
|
+
*/
|
|
675
|
+
enum OffMeshLinkType
|
|
676
|
+
{ LinkTypeManual = 0, LinkTypeDropDown = 1, LinkTypeJumpAcross = 2 }
|
|
677
|
+
/** Link allowing movement outside the planar navigation mesh.
|
|
678
|
+
*/
|
|
679
|
+
class OffMeshLink extends UnityEngine.Behaviour
|
|
680
|
+
{
|
|
681
|
+
protected [__keep_incompatibility]: never;
|
|
682
|
+
public constructor ()
|
|
683
|
+
}
|
|
684
|
+
/** Contains data describing a triangulation of a navmesh.
|
|
685
|
+
*/
|
|
686
|
+
class NavMeshTriangulation extends System.ValueType
|
|
687
|
+
{
|
|
688
|
+
protected [__keep_incompatibility]: never;
|
|
689
|
+
/** Vertices for the navmesh triangulation.
|
|
690
|
+
*/
|
|
691
|
+
public vertices : System.Array$1<UnityEngine.Vector3>
|
|
692
|
+
/** Triangle indices for the navmesh triangulation.
|
|
693
|
+
*/
|
|
694
|
+
public indices : System.Array$1<number>
|
|
695
|
+
/** NavMesh area indices for the navmesh triangulation.
|
|
696
|
+
*/
|
|
697
|
+
public areas : System.Array$1<number>
|
|
698
|
+
}
|
|
699
|
+
/** The instance is returned when adding NavMesh data.
|
|
700
|
+
*/
|
|
701
|
+
class NavMeshDataInstance extends System.ValueType
|
|
702
|
+
{
|
|
703
|
+
protected [__keep_incompatibility]: never;
|
|
704
|
+
/** True if the NavMesh data is added to the navigation system - otherwise false (Read Only).
|
|
705
|
+
*/
|
|
706
|
+
public get valid(): boolean;
|
|
707
|
+
/** Get or set the owning Object.
|
|
708
|
+
*/
|
|
709
|
+
public get owner(): UnityEngine.Object;
|
|
710
|
+
public set owner(value: UnityEngine.Object);
|
|
711
|
+
/** Removes this instance from the NavMesh system.
|
|
712
|
+
*/
|
|
713
|
+
public Remove () : void
|
|
714
|
+
}
|
|
715
|
+
/** Used for runtime manipulation of links connecting polygons of the NavMesh.
|
|
716
|
+
*/
|
|
717
|
+
class NavMeshLinkData extends System.ValueType
|
|
718
|
+
{
|
|
719
|
+
protected [__keep_incompatibility]: never;
|
|
720
|
+
/** Start position of the link.
|
|
721
|
+
*/
|
|
722
|
+
public get startPosition(): UnityEngine.Vector3;
|
|
723
|
+
public set startPosition(value: UnityEngine.Vector3);
|
|
724
|
+
/** End position of the link.
|
|
725
|
+
*/
|
|
726
|
+
public get endPosition(): UnityEngine.Vector3;
|
|
727
|
+
public set endPosition(value: UnityEngine.Vector3);
|
|
728
|
+
/** If positive, overrides the pathfinder cost to traverse the link.
|
|
729
|
+
*/
|
|
730
|
+
public get costModifier(): number;
|
|
731
|
+
public set costModifier(value: number);
|
|
732
|
+
/** If true, the link can be traversed in both directions, otherwise only from start to end position.
|
|
733
|
+
*/
|
|
734
|
+
public get bidirectional(): boolean;
|
|
735
|
+
public set bidirectional(value: boolean);
|
|
736
|
+
/** If positive, the link will be rectangle aligned along the line from start to end.
|
|
737
|
+
*/
|
|
738
|
+
public get width(): number;
|
|
739
|
+
public set width(value: number);
|
|
740
|
+
/** Area type of the link.
|
|
741
|
+
*/
|
|
742
|
+
public get area(): number;
|
|
743
|
+
public set area(value: number);
|
|
744
|
+
/** Specifies which agent type this link is available for.
|
|
745
|
+
*/
|
|
746
|
+
public get agentTypeID(): number;
|
|
747
|
+
public set agentTypeID(value: number);
|
|
748
|
+
}
|
|
749
|
+
/** Represents a link available for pathfinding.
|
|
750
|
+
*/
|
|
751
|
+
class NavMeshLinkInstance extends System.ValueType
|
|
752
|
+
{
|
|
753
|
+
protected [__keep_incompatibility]: never;
|
|
754
|
+
}
|
|
755
|
+
/** Specifies which agent type and areas to consider when searching the NavMesh.
|
|
756
|
+
*/
|
|
757
|
+
class NavMeshQueryFilter extends System.ValueType
|
|
758
|
+
{
|
|
759
|
+
protected [__keep_incompatibility]: never;
|
|
760
|
+
/** A bitmask representing the traversable area types.
|
|
761
|
+
*/
|
|
762
|
+
public get areaMask(): number;
|
|
763
|
+
public set areaMask(value: number);
|
|
764
|
+
/** The agent type ID, specifying which navigation meshes to consider for the query functions.
|
|
765
|
+
*/
|
|
766
|
+
public get agentTypeID(): number;
|
|
767
|
+
public set agentTypeID(value: number);
|
|
768
|
+
/** Returns the area cost multiplier for the given area type for this filter.
|
|
769
|
+
* @param $areaIndex Index to retreive the cost for.
|
|
770
|
+
* @returns The cost multiplier for the supplied area index.
|
|
771
|
+
*/
|
|
772
|
+
public GetAreaCost ($areaIndex: number) : number
|
|
773
|
+
/** Sets the pathfinding cost multiplier for this filter for a given area type.
|
|
774
|
+
* @param $areaIndex The area index to set the cost for.
|
|
775
|
+
* @param $cost The cost for the supplied area index.
|
|
776
|
+
*/
|
|
777
|
+
public SetAreaCost ($areaIndex: number, $cost: number) : void
|
|
778
|
+
}
|
|
779
|
+
/** Singleton class to access the baked NavMesh.
|
|
780
|
+
*/
|
|
781
|
+
class NavMesh extends System.Object
|
|
782
|
+
{
|
|
783
|
+
protected [__keep_incompatibility]: never;
|
|
784
|
+
/** Area mask constant that includes all NavMesh areas.
|
|
785
|
+
*/
|
|
786
|
+
public static AllAreas : number
|
|
787
|
+
/** Set a function to be called before the NavMesh is updated during the frame update execution.
|
|
788
|
+
*/
|
|
789
|
+
public static onPreUpdate : UnityEngine.AI.NavMesh.OnNavMeshPreUpdate
|
|
790
|
+
/** Describes how far in the future the agents predict collisions for avoidance.
|
|
791
|
+
*/
|
|
792
|
+
public static get avoidancePredictionTime(): number;
|
|
793
|
+
public static set avoidancePredictionTime(value: number);
|
|
794
|
+
/** The maximum number of nodes processed for each frame during the asynchronous pathfinding process.
|
|
795
|
+
*/
|
|
796
|
+
public static get pathfindingIterationsPerFrame(): number;
|
|
797
|
+
public static set pathfindingIterationsPerFrame(value: number);
|
|
798
|
+
/** Trace a line between two points on the NavMesh.
|
|
799
|
+
* @param $sourcePosition The origin of the ray.
|
|
800
|
+
* @param $targetPosition The end of the ray.
|
|
801
|
+
* @param $hit Holds the properties of the ray cast resulting location.
|
|
802
|
+
* @param $areaMask A bitfield mask specifying which NavMesh areas can be passed when tracing the ray.
|
|
803
|
+
* @returns True if the ray is terminated before reaching target position. Otherwise returns false.
|
|
804
|
+
*/
|
|
805
|
+
public static Raycast ($sourcePosition: UnityEngine.Vector3, $targetPosition: UnityEngine.Vector3, $hit: $Ref<UnityEngine.AI.NavMeshHit>, $areaMask: number) : boolean
|
|
806
|
+
/** Calculate a path between two points and store the resulting path.
|
|
807
|
+
* @param $sourcePosition The initial position of the path requested.
|
|
808
|
+
* @param $targetPosition The final position of the path requested.
|
|
809
|
+
* @param $areaMask A bitfield mask specifying which NavMesh areas can be passed when calculating a path.
|
|
810
|
+
* @param $path The resulting path.
|
|
811
|
+
* @returns True if either a complete or partial path is found. False otherwise.
|
|
812
|
+
*/
|
|
813
|
+
public static CalculatePath ($sourcePosition: UnityEngine.Vector3, $targetPosition: UnityEngine.Vector3, $areaMask: number, $path: UnityEngine.AI.NavMeshPath) : boolean
|
|
814
|
+
/** Locate the closest NavMesh edge from a point on the NavMesh.
|
|
815
|
+
* @param $sourcePosition The origin of the distance query.
|
|
816
|
+
* @param $hit Holds the properties of the resulting location.
|
|
817
|
+
* @param $areaMask A bitfield mask specifying which NavMesh areas can be passed when finding the nearest edge.
|
|
818
|
+
* @returns True if the nearest edge is found.
|
|
819
|
+
*/
|
|
820
|
+
public static FindClosestEdge ($sourcePosition: UnityEngine.Vector3, $hit: $Ref<UnityEngine.AI.NavMeshHit>, $areaMask: number) : boolean
|
|
821
|
+
/** Finds the nearest point based on the NavMesh within a specified range.
|
|
822
|
+
* @param $sourcePosition The origin of the sample query.
|
|
823
|
+
* @param $hit Holds the properties of the resulting location. The value of hit.normal is never computed. It is always (0,0,0).
|
|
824
|
+
* @param $maxDistance Sample within this distance from sourcePosition.
|
|
825
|
+
* @param $areaMask A mask that specifies the NavMesh areas allowed when finding the nearest point.
|
|
826
|
+
* @returns True if the nearest point is found.
|
|
827
|
+
*/
|
|
828
|
+
public static SamplePosition ($sourcePosition: UnityEngine.Vector3, $hit: $Ref<UnityEngine.AI.NavMeshHit>, $maxDistance: number, $areaMask: number) : boolean
|
|
829
|
+
/** Sets the cost for finding path over geometry of the area type on all agents.
|
|
830
|
+
* @param $areaIndex Index of the area to set.
|
|
831
|
+
* @param $cost New cost.
|
|
832
|
+
*/
|
|
833
|
+
public static SetAreaCost ($areaIndex: number, $cost: number) : void
|
|
834
|
+
/** Gets the cost for path finding over geometry of the area type.
|
|
835
|
+
* @param $areaIndex Index of the area to get.
|
|
836
|
+
*/
|
|
837
|
+
public static GetAreaCost ($areaIndex: number) : number
|
|
838
|
+
/** Returns the area index for a named NavMesh area type.
|
|
839
|
+
* @param $areaName Name of the area to look up.
|
|
840
|
+
* @returns Index if the specified are, or -1 if no area found.
|
|
841
|
+
*/
|
|
842
|
+
public static GetAreaFromName ($areaName: string) : number
|
|
843
|
+
/** Calculates triangulation of the current navmesh.
|
|
844
|
+
*/
|
|
845
|
+
public static CalculateTriangulation () : UnityEngine.AI.NavMeshTriangulation
|
|
846
|
+
/** Adds the specified NavMeshData to the game.
|
|
847
|
+
* @param $navMeshData Contains the data for the navmesh.
|
|
848
|
+
* @returns Representing the added navmesh.
|
|
849
|
+
*/
|
|
850
|
+
public static AddNavMeshData ($navMeshData: UnityEngine.AI.NavMeshData) : UnityEngine.AI.NavMeshDataInstance
|
|
851
|
+
/** Adds the specified NavMeshData to the game.
|
|
852
|
+
* @param $navMeshData Contains the data for the navmesh.
|
|
853
|
+
* @param $position Translate the navmesh to this position.
|
|
854
|
+
* @param $rotation Rotate the navmesh to this orientation.
|
|
855
|
+
* @returns Representing the added navmesh.
|
|
856
|
+
*/
|
|
857
|
+
public static AddNavMeshData ($navMeshData: UnityEngine.AI.NavMeshData, $position: UnityEngine.Vector3, $rotation: UnityEngine.Quaternion) : UnityEngine.AI.NavMeshDataInstance
|
|
858
|
+
/** Removes the specified NavMeshDataInstance from the game, making it unavailable for agents and queries.
|
|
859
|
+
* @param $handle The instance of a NavMesh to remove.
|
|
860
|
+
*/
|
|
861
|
+
public static RemoveNavMeshData ($handle: UnityEngine.AI.NavMeshDataInstance) : void
|
|
862
|
+
/** Adds a link to the NavMesh. The link is described by the NavMeshLinkData struct.
|
|
863
|
+
* @param $link Object that describes the properties of the link.
|
|
864
|
+
* @returns Object that identifies the added link.
|
|
865
|
+
*/
|
|
866
|
+
public static AddLink ($link: UnityEngine.AI.NavMeshLinkData) : UnityEngine.AI.NavMeshLinkInstance
|
|
867
|
+
/** Adds a link to the NavMesh. The link is described by the NavMeshLinkData struct.
|
|
868
|
+
* @param $link Object that describes the properties of the link.
|
|
869
|
+
* @param $position Translate the link to this position.
|
|
870
|
+
* @param $rotation Rotate the link to this orientation.
|
|
871
|
+
* @returns Object that identifies the added link.
|
|
872
|
+
*/
|
|
873
|
+
public static AddLink ($link: UnityEngine.AI.NavMeshLinkData, $position: UnityEngine.Vector3, $rotation: UnityEngine.Quaternion) : UnityEngine.AI.NavMeshLinkInstance
|
|
874
|
+
/** Removes a link from the NavMesh.
|
|
875
|
+
* @param $handle The instance of a link to remove.
|
|
876
|
+
*/
|
|
877
|
+
public static RemoveLink ($handle: UnityEngine.AI.NavMeshLinkInstance) : void
|
|
878
|
+
/** Determines whether the instance of the link can be used to NavMesh.CalculatePath|calculate paths, and if NavMesh agents can move over it.
|
|
879
|
+
* @param $handle The link instance whose state to query.
|
|
880
|
+
* @returns True if agents can plan paths through, and traverse, this instance of the link, otherwise false.
|
|
881
|
+
*/
|
|
882
|
+
public static IsLinkActive ($handle: UnityEngine.AI.NavMeshLinkInstance) : boolean
|
|
883
|
+
/** Activates or deactivates the link instance. An active link instance can be traversed by agents and used to plan paths, but a deactivated link cannot.
|
|
884
|
+
* @param $handle The link instance whose active state to modify.
|
|
885
|
+
* @param $value Whether agents can plan paths through, and traverse, the link. When the value is true, agents can plan paths through, and traverse, the link. Otherwise, no paths can use the link instance.
|
|
886
|
+
*/
|
|
887
|
+
public static SetLinkActive ($handle: UnityEngine.AI.NavMeshLinkInstance, $value: boolean) : void
|
|
888
|
+
/** Determines whether or not a NavMesh agent is currently using this link.
|
|
889
|
+
* @param $handle The link instance whose state to query.
|
|
890
|
+
* @returns True if an agent is currently traversing the link, otherwise false.
|
|
891
|
+
*/
|
|
892
|
+
public static IsLinkOccupied ($handle: UnityEngine.AI.NavMeshLinkInstance) : boolean
|
|
893
|
+
/** Determines whether the link instance is part of the current data used for navigation.
|
|
894
|
+
* @param $handle The identifier of the link instance to check.
|
|
895
|
+
* @returns True if the NavMesh link is added to the navigation system - otherwise false.
|
|
896
|
+
*/
|
|
897
|
+
public static IsLinkValid ($handle: UnityEngine.AI.NavMeshLinkInstance) : boolean
|
|
898
|
+
/** Gets the object, if any, that is associated with the link instance.
|
|
899
|
+
* @param $handle The identifier of the link instance whose owner needs to be retrieved.
|
|
900
|
+
* @returns The object that was passed into SetLinkOwner for the specified link instance.
|
|
901
|
+
Returns null when no owner object has been assigned or when the link instance is not valid.
|
|
902
|
+
*/
|
|
903
|
+
public static GetLinkOwner ($handle: UnityEngine.AI.NavMeshLinkInstance) : UnityEngine.Object
|
|
904
|
+
/** Associates an object with the instance of a link.
|
|
905
|
+
* @param $handle The identifier of the link instance for which you assign an owner.
|
|
906
|
+
* @param $owner An object that carries useful information in relation to the instance of the link.
|
|
907
|
+
*/
|
|
908
|
+
public static SetLinkOwner ($handle: UnityEngine.AI.NavMeshLinkInstance, $owner: UnityEngine.Object) : void
|
|
909
|
+
/** Samples the position nearest the sourcePosition on any NavMesh built for the agent type specified by the filter.
|
|
910
|
+
* @param $sourcePosition The origin of the sample query.
|
|
911
|
+
* @param $hit Holds the properties of the resulting location. The value of hit.normal is never computed. It is always (0,0,0).
|
|
912
|
+
* @param $maxDistance Sample within this distance from sourcePosition.
|
|
913
|
+
* @param $filter A filter specifying which NavMesh areas are allowed when finding the nearest point.
|
|
914
|
+
* @returns True if the nearest point is found.
|
|
915
|
+
*/
|
|
916
|
+
public static SamplePosition ($sourcePosition: UnityEngine.Vector3, $hit: $Ref<UnityEngine.AI.NavMeshHit>, $maxDistance: number, $filter: UnityEngine.AI.NavMeshQueryFilter) : boolean
|
|
917
|
+
/** Locate the closest NavMesh edge from a point on the NavMesh, subject to the constraints of the filter argument.
|
|
918
|
+
* @param $sourcePosition The origin of the distance query.
|
|
919
|
+
* @param $hit Holds the properties of the resulting location.
|
|
920
|
+
* @param $filter A filter specifying which NavMesh areas can be passed when finding the nearest edge.
|
|
921
|
+
* @returns True if the nearest edge is found.
|
|
922
|
+
*/
|
|
923
|
+
public static FindClosestEdge ($sourcePosition: UnityEngine.Vector3, $hit: $Ref<UnityEngine.AI.NavMeshHit>, $filter: UnityEngine.AI.NavMeshQueryFilter) : boolean
|
|
924
|
+
/** Traces a line between two positions on the NavMesh, subject to the constraints defined by the filter argument.
|
|
925
|
+
* @param $sourcePosition The origin of the ray.
|
|
926
|
+
* @param $targetPosition The end of the ray.
|
|
927
|
+
* @param $hit Holds the properties of the ray cast resulting location.
|
|
928
|
+
* @param $filter A filter specifying which NavMesh areas can be passed when tracing the ray.
|
|
929
|
+
* @returns True if the ray is terminated before reaching target position. Otherwise returns false.
|
|
930
|
+
*/
|
|
931
|
+
public static Raycast ($sourcePosition: UnityEngine.Vector3, $targetPosition: UnityEngine.Vector3, $hit: $Ref<UnityEngine.AI.NavMeshHit>, $filter: UnityEngine.AI.NavMeshQueryFilter) : boolean
|
|
932
|
+
/** Calculates a path between two positions mapped to the NavMesh, subject to the constraints and costs defined by the filter argument.
|
|
933
|
+
* @param $sourcePosition The initial position of the path requested.
|
|
934
|
+
* @param $targetPosition The final position of the path requested.
|
|
935
|
+
* @param $filter A filter specifying the cost of NavMesh areas that can be passed when calculating a path.
|
|
936
|
+
* @param $path The resulting path.
|
|
937
|
+
* @returns True if a either a complete or partial path is found and false otherwise.
|
|
938
|
+
*/
|
|
939
|
+
public static CalculatePath ($sourcePosition: UnityEngine.Vector3, $targetPosition: UnityEngine.Vector3, $filter: UnityEngine.AI.NavMeshQueryFilter, $path: UnityEngine.AI.NavMeshPath) : boolean
|
|
940
|
+
/** Creates and returns a new entry of NavMesh build settings available for runtime NavMesh building.
|
|
941
|
+
* @returns The created settings.
|
|
942
|
+
*/
|
|
943
|
+
public static CreateSettings () : UnityEngine.AI.NavMeshBuildSettings
|
|
944
|
+
/** Removes the build settings matching the agent type ID.
|
|
945
|
+
* @param $agentTypeID The ID of the entry to remove.
|
|
946
|
+
*/
|
|
947
|
+
public static RemoveSettings ($agentTypeID: number) : void
|
|
948
|
+
/** Returns an existing entry of NavMesh build settings.
|
|
949
|
+
* @param $agentTypeID The ID to look for.
|
|
950
|
+
* @returns The settings found.
|
|
951
|
+
*/
|
|
952
|
+
public static GetSettingsByID ($agentTypeID: number) : UnityEngine.AI.NavMeshBuildSettings
|
|
953
|
+
/** Returns the number of registered NavMesh build settings.
|
|
954
|
+
* @returns The number of registered entries.
|
|
955
|
+
*/
|
|
956
|
+
public static GetSettingsCount () : number
|
|
957
|
+
/** Returns an existing entry of NavMesh build settings by its ordered index.
|
|
958
|
+
* @param $index The index to retrieve from.
|
|
959
|
+
* @returns The found settings.
|
|
960
|
+
*/
|
|
961
|
+
public static GetSettingsByIndex ($index: number) : UnityEngine.AI.NavMeshBuildSettings
|
|
962
|
+
/** Returns the name associated with the NavMesh build settings matching the provided agent type ID.
|
|
963
|
+
* @param $agentTypeID The ID to look for.
|
|
964
|
+
* @returns The name associated with the ID found.
|
|
965
|
+
*/
|
|
966
|
+
public static GetSettingsNameFromID ($agentTypeID: number) : string
|
|
967
|
+
/** Removes all NavMesh surfaces and links from the game.
|
|
968
|
+
*/
|
|
969
|
+
public static RemoveAllNavMeshData () : void
|
|
970
|
+
}
|
|
971
|
+
/** Bitmask used for operating with debug data from the NavMesh build process.
|
|
972
|
+
*/
|
|
973
|
+
enum NavMeshBuildDebugFlags
|
|
974
|
+
{ None = 0, InputGeometry = 1, Voxels = 2, Regions = 4, RawContours = 8, SimplifiedContours = 16, PolygonMeshes = 32, PolygonMeshesDetail = 64, All = 127 }
|
|
975
|
+
/** Used with NavMeshBuildSource to define the shape for building NavMesh.
|
|
976
|
+
*/
|
|
977
|
+
enum NavMeshBuildSourceShape
|
|
978
|
+
{ Mesh = 0, Terrain = 1, Box = 2, Sphere = 3, Capsule = 4, ModifierBox = 5 }
|
|
979
|
+
/** Specify which of the temporary data generated while building the NavMesh should be retained in memory after the process has completed.
|
|
980
|
+
*/
|
|
981
|
+
class NavMeshBuildDebugSettings extends System.ValueType
|
|
982
|
+
{
|
|
983
|
+
protected [__keep_incompatibility]: never;
|
|
984
|
+
/** Specify which types of debug data to collect when building the NavMesh.
|
|
985
|
+
*/
|
|
986
|
+
public get flags(): UnityEngine.AI.NavMeshBuildDebugFlags;
|
|
987
|
+
public set flags(value: UnityEngine.AI.NavMeshBuildDebugFlags);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
namespace UnityEngine.AI.NavMesh {
|
|
991
|
+
interface OnNavMeshPreUpdate
|
|
992
|
+
{
|
|
993
|
+
() : void;
|
|
994
|
+
Invoke?: () => void;
|
|
995
|
+
}
|
|
996
|
+
var OnNavMeshPreUpdate: { new (func: () => void): OnNavMeshPreUpdate; }
|
|
997
|
+
}
|
|
998
|
+
}
|