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.
@@ -0,0 +1,337 @@
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 {
17
+ /** The result of an Asset Bundle Load or Recompress Operation.
18
+ */
19
+ enum AssetBundleLoadResult
20
+ { Success = 0, Cancelled = 1, NotMatchingCrc = 2, FailedCache = 3, NotValidAssetBundle = 4, NoSerializedData = 5, NotCompatible = 6, AlreadyLoaded = 7, FailedRead = 8, FailedDecompression = 9, FailedWrite = 10, FailedDeleteRecompressionTarget = 11, RecompressionTargetIsLoaded = 12, RecompressionTargetExistsButNotArchive = 13 }
21
+ /** API for accessing the content of AssetBundle files.
22
+ */
23
+ class AssetBundle extends UnityEngine.Object
24
+ {
25
+ protected [__keep_incompatibility]: never;
26
+ /** Return true if the AssetBundle contains Unity Scene files
27
+ */
28
+ public get isStreamedSceneAssetBundle(): boolean;
29
+ /** Controls the size of the shared AssetBundle loading cache. Default value is 1MB.
30
+ */
31
+ public static get memoryBudgetKB(): number;
32
+ public static set memoryBudgetKB(value: number);
33
+ /** Unloads all currently loaded AssetBundles.
34
+ * @param $unloadAllObjects Determines whether the current instances of objects loaded from AssetBundles will also be unloaded.
35
+ */
36
+ public static UnloadAllAssetBundles ($unloadAllObjects: boolean) : void
37
+ /** Get an enumeration of all the currently loaded AssetBundles.
38
+ */
39
+ public static GetAllLoadedAssetBundles () : System.Collections.Generic.IEnumerable$1<UnityEngine.AssetBundle>
40
+ /** Asynchronously loads an AssetBundle from a file on disk.
41
+ * @param $path Path of the file on disk.
42
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
43
+ * @param $offset An optional byte offset. This value specifies where to start reading the AssetBundle from.
44
+ * @returns Asynchronous load request for an AssetBundle. Use AssetBundleCreateRequest.assetBundle property to get an AssetBundle once it is loaded.
45
+ */
46
+ public static LoadFromFileAsync ($path: string) : UnityEngine.AssetBundleCreateRequest
47
+ /** Asynchronously loads an AssetBundle from a file on disk.
48
+ * @param $path Path of the file on disk.
49
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
50
+ * @param $offset An optional byte offset. This value specifies where to start reading the AssetBundle from.
51
+ * @returns Asynchronous load request for an AssetBundle. Use AssetBundleCreateRequest.assetBundle property to get an AssetBundle once it is loaded.
52
+ */
53
+ public static LoadFromFileAsync ($path: string, $crc: number) : UnityEngine.AssetBundleCreateRequest
54
+ /** Asynchronously loads an AssetBundle from a file on disk.
55
+ * @param $path Path of the file on disk.
56
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
57
+ * @param $offset An optional byte offset. This value specifies where to start reading the AssetBundle from.
58
+ * @returns Asynchronous load request for an AssetBundle. Use AssetBundleCreateRequest.assetBundle property to get an AssetBundle once it is loaded.
59
+ */
60
+ public static LoadFromFileAsync ($path: string, $crc: number, $offset: bigint) : UnityEngine.AssetBundleCreateRequest
61
+ /** Synchronously loads an AssetBundle from a file on disk.
62
+ * @param $path Path of the file on disk.
63
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
64
+ * @param $offset An optional byte offset. This value specifies where to start reading the AssetBundle from.
65
+ * @returns Loaded AssetBundle object or null if failed.
66
+ */
67
+ public static LoadFromFile ($path: string) : UnityEngine.AssetBundle
68
+ /** Synchronously loads an AssetBundle from a file on disk.
69
+ * @param $path Path of the file on disk.
70
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
71
+ * @param $offset An optional byte offset. This value specifies where to start reading the AssetBundle from.
72
+ * @returns Loaded AssetBundle object or null if failed.
73
+ */
74
+ public static LoadFromFile ($path: string, $crc: number) : UnityEngine.AssetBundle
75
+ /** Synchronously loads an AssetBundle from a file on disk.
76
+ * @param $path Path of the file on disk.
77
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
78
+ * @param $offset An optional byte offset. This value specifies where to start reading the AssetBundle from.
79
+ * @returns Loaded AssetBundle object or null if failed.
80
+ */
81
+ public static LoadFromFile ($path: string, $crc: number, $offset: bigint) : UnityEngine.AssetBundle
82
+ /** Asynchronously load an AssetBundle from a memory region.
83
+ * @param $binary Array of bytes with the AssetBundle data.
84
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
85
+ * @returns Asynchronous load request for an AssetBundle. Use AssetBundleCreateRequest.assetBundle property to get an AssetBundle once it is loaded.
86
+ */
87
+ public static LoadFromMemoryAsync ($binary: System.Array$1<number>) : UnityEngine.AssetBundleCreateRequest
88
+ /** Asynchronously load an AssetBundle from a memory region.
89
+ * @param $binary Array of bytes with the AssetBundle data.
90
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
91
+ * @returns Asynchronous load request for an AssetBundle. Use AssetBundleCreateRequest.assetBundle property to get an AssetBundle once it is loaded.
92
+ */
93
+ public static LoadFromMemoryAsync ($binary: System.Array$1<number>, $crc: number) : UnityEngine.AssetBundleCreateRequest
94
+ /** Synchronously load an AssetBundle from a memory region.
95
+ * @param $binary Array of bytes with the AssetBundle data.
96
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
97
+ * @returns Loaded AssetBundle object or null if failed.
98
+ */
99
+ public static LoadFromMemory ($binary: System.Array$1<number>) : UnityEngine.AssetBundle
100
+ /** Synchronously load an AssetBundle from a memory region.
101
+ * @param $binary Array of bytes with the AssetBundle data.
102
+ * @param $crc An optional CRC-32 checksum of the uncompressed content. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match.
103
+ * @returns Loaded AssetBundle object or null if failed.
104
+ */
105
+ public static LoadFromMemory ($binary: System.Array$1<number>, $crc: number) : UnityEngine.AssetBundle
106
+ /** Asynchronously loads an AssetBundle from a managed Stream.
107
+ * @param $stream The managed Stream object. Unity calls Read(), Seek() and the Length property on this object to load the AssetBundle data.
108
+ * @param $crc An optional CRC-32 checksum of the uncompressed content.
109
+ * @param $managedReadBufferSize You can use this to override the size of the read buffer Unity uses while loading data. The default size is 32KB.
110
+ * @returns Asynchronous load request for an AssetBundle. Use AssetBundleCreateRequest.assetBundle property to get an AssetBundle once it is loaded.
111
+ */
112
+ public static LoadFromStreamAsync ($stream: System.IO.Stream, $crc: number, $managedReadBufferSize: number) : UnityEngine.AssetBundleCreateRequest
113
+ /** Asynchronously loads an AssetBundle from a managed Stream.
114
+ * @param $stream The managed Stream object. Unity calls Read(), Seek() and the Length property on this object to load the AssetBundle data.
115
+ * @param $crc An optional CRC-32 checksum of the uncompressed content.
116
+ * @param $managedReadBufferSize You can use this to override the size of the read buffer Unity uses while loading data. The default size is 32KB.
117
+ * @returns Asynchronous load request for an AssetBundle. Use AssetBundleCreateRequest.assetBundle property to get an AssetBundle once it is loaded.
118
+ */
119
+ public static LoadFromStreamAsync ($stream: System.IO.Stream, $crc: number) : UnityEngine.AssetBundleCreateRequest
120
+ /** Asynchronously loads an AssetBundle from a managed Stream.
121
+ * @param $stream The managed Stream object. Unity calls Read(), Seek() and the Length property on this object to load the AssetBundle data.
122
+ * @param $crc An optional CRC-32 checksum of the uncompressed content.
123
+ * @param $managedReadBufferSize You can use this to override the size of the read buffer Unity uses while loading data. The default size is 32KB.
124
+ * @returns Asynchronous load request for an AssetBundle. Use AssetBundleCreateRequest.assetBundle property to get an AssetBundle once it is loaded.
125
+ */
126
+ public static LoadFromStreamAsync ($stream: System.IO.Stream) : UnityEngine.AssetBundleCreateRequest
127
+ /** Synchronously loads an AssetBundle from a managed Stream.
128
+ * @param $stream The managed Stream object. Unity calls Read(), Seek() and the Length property on this object to load the AssetBundle data.
129
+ * @param $crc An optional CRC-32 checksum of the uncompressed content.
130
+ * @param $managedReadBufferSize You can use this to override the size of the read buffer Unity uses while loading data. The default size is 32KB.
131
+ * @returns The loaded AssetBundle object or null when the object fails to load.
132
+ */
133
+ public static LoadFromStream ($stream: System.IO.Stream, $crc: number, $managedReadBufferSize: number) : UnityEngine.AssetBundle
134
+ /** Synchronously loads an AssetBundle from a managed Stream.
135
+ * @param $stream The managed Stream object. Unity calls Read(), Seek() and the Length property on this object to load the AssetBundle data.
136
+ * @param $crc An optional CRC-32 checksum of the uncompressed content.
137
+ * @param $managedReadBufferSize You can use this to override the size of the read buffer Unity uses while loading data. The default size is 32KB.
138
+ * @returns The loaded AssetBundle object or null when the object fails to load.
139
+ */
140
+ public static LoadFromStream ($stream: System.IO.Stream, $crc: number) : UnityEngine.AssetBundle
141
+ /** Synchronously loads an AssetBundle from a managed Stream.
142
+ * @param $stream The managed Stream object. Unity calls Read(), Seek() and the Length property on this object to load the AssetBundle data.
143
+ * @param $crc An optional CRC-32 checksum of the uncompressed content.
144
+ * @param $managedReadBufferSize You can use this to override the size of the read buffer Unity uses while loading data. The default size is 32KB.
145
+ * @returns The loaded AssetBundle object or null when the object fails to load.
146
+ */
147
+ public static LoadFromStream ($stream: System.IO.Stream) : UnityEngine.AssetBundle
148
+ /** Check if an AssetBundle contains a specific object.
149
+ */
150
+ public Contains ($name: string) : boolean
151
+ /** Synchronously loads an Asset from the AssetBundle.
152
+ * @param $name Name of the Asset. For the most precise matching this should be the relative path of the Asset that was built into the AssetBundle, including the file extension.
153
+ The relative path and file extension are optional, and Assets can be found and loaded based on the filename alone. However this opens the potential for unexpected results if the filename is not unique within the AssetBundle.
154
+ At build time it is also possible to specify a name for the Asset using AssetBundleBuild.addressableNames. In that case that specified name will be expected to load the Asset instead of the Asset path.
155
+ * @param $type The provided type will be checked against the Asset's main object, and if that is not compatible it will be matched against visible objects within the Asset.
156
+ Not all nested objects are visible, for example this will not work to directly retrieve a Transform, MonoBehaviour or other Component.
157
+ In cases where there are multiple matches for the name argument, the requested type can determine which Asset to load.
158
+ */
159
+ public LoadAsset ($name: string) : UnityEngine.Object
160
+ /** Synchronously loads an Asset from the AssetBundle.
161
+ * @param $name Name of the Asset. For the most precise matching this should be the relative path of the Asset that was built into the AssetBundle, including the file extension.
162
+ The relative path and file extension are optional, and Assets can be found and loaded based on the filename alone. However this opens the potential for unexpected results if the filename is not unique within the AssetBundle.
163
+ At build time it is also possible to specify a name for the Asset using AssetBundleBuild.addressableNames. In that case that specified name will be expected to load the Asset instead of the Asset path.
164
+ * @param $type The provided type will be checked against the Asset's main object, and if that is not compatible it will be matched against visible objects within the Asset.
165
+ Not all nested objects are visible, for example this will not work to directly retrieve a Transform, MonoBehaviour or other Component.
166
+ In cases where there are multiple matches for the name argument, the requested type can determine which Asset to load.
167
+ */
168
+ public LoadAsset ($name: string, $type: System.Type) : UnityEngine.Object
169
+ /** Asynchronously loads an Asset from the bundle.
170
+ * @param $name Name of the Asset. For the most precise matching this should be the relative path of the Asset that was built into the AssetBundle, including the file extension.
171
+ The relative path and file extension are optional, and Assets can be found and loaded based on the filename alone. However this opens the potential for unexpected results if the filename is not unique within the AssetBundle.
172
+ At build time it is also possible to specify a name for the Asset using AssetBundleBuild.addressableNames. In that case that specified name will be expected to load the Asset instead of the Asset path.
173
+ * @param $type The provided type will be checked against the Asset's main object, and if that is not compatible it will be matched against visible objects within the Asset.
174
+ Not all nested objects are visible, for example this will not work to directly retrieve a Transform, MonoBehaviour or other Component.
175
+ In cases where there are multiple matches for the name argument, the requested type can determine which Asset to load.
176
+ */
177
+ public LoadAssetAsync ($name: string) : UnityEngine.AssetBundleRequest
178
+ /** Asynchronously loads an Asset from the bundle.
179
+ * @param $name Name of the Asset. For the most precise matching this should be the relative path of the Asset that was built into the AssetBundle, including the file extension.
180
+ The relative path and file extension are optional, and Assets can be found and loaded based on the filename alone. However this opens the potential for unexpected results if the filename is not unique within the AssetBundle.
181
+ At build time it is also possible to specify a name for the Asset using AssetBundleBuild.addressableNames. In that case that specified name will be expected to load the Asset instead of the Asset path.
182
+ * @param $type The provided type will be checked against the Asset's main object, and if that is not compatible it will be matched against visible objects within the Asset.
183
+ Not all nested objects are visible, for example this will not work to directly retrieve a Transform, MonoBehaviour or other Component.
184
+ In cases where there are multiple matches for the name argument, the requested type can determine which Asset to load.
185
+ */
186
+ public LoadAssetAsync ($name: string, $type: System.Type) : UnityEngine.AssetBundleRequest
187
+ /** Loads Asset and sub Assets from the AssetBundle synchronously.
188
+ * @param $name Name of the Asset.
189
+ * @param $type Type to load.
190
+ */
191
+ public LoadAssetWithSubAssets ($name: string) : System.Array$1<UnityEngine.Object>
192
+ /** Loads Asset and sub Assets from the AssetBundle synchronously.
193
+ * @param $name Name of the Asset.
194
+ * @param $type Type to load.
195
+ */
196
+ public LoadAssetWithSubAssets ($name: string, $type: System.Type) : System.Array$1<UnityEngine.Object>
197
+ /** Loads Asset and sub Assets from the AssetBundle asynchronously.
198
+ * @param $name Name of the Asset.
199
+ * @param $type Type to load.
200
+ */
201
+ public LoadAssetWithSubAssetsAsync ($name: string) : UnityEngine.AssetBundleRequest
202
+ /** Loads Asset and sub Assets from the AssetBundle asynchronously.
203
+ * @param $name Name of the Asset.
204
+ * @param $type Type to load.
205
+ */
206
+ public LoadAssetWithSubAssetsAsync ($name: string, $type: System.Type) : UnityEngine.AssetBundleRequest
207
+ /** Loads all Assets contained in the AssetBundle synchronously.
208
+ * @param $type When specified only main or visible objects that derive from the provided type are returned.
209
+ */
210
+ public LoadAllAssets () : System.Array$1<UnityEngine.Object>
211
+ /** Loads all Assets contained in the AssetBundle synchronously.
212
+ * @param $type When specified only main or visible objects that derive from the provided type are returned.
213
+ */
214
+ public LoadAllAssets ($type: System.Type) : System.Array$1<UnityEngine.Object>
215
+ /** Loads all Assets contained in the AssetBundle asynchronously.
216
+ * @param $type When specified only main or visible objects that derive from the provided type are returned.
217
+ */
218
+ public LoadAllAssetsAsync () : UnityEngine.AssetBundleRequest
219
+ /** Loads all Assets contained in the AssetBundle asynchronously.
220
+ * @param $type When specified only main or visible objects that derive from the provided type are returned.
221
+ */
222
+ public LoadAllAssetsAsync ($type: System.Type) : UnityEngine.AssetBundleRequest
223
+ /** Unloads an AssetBundle freeing its data.
224
+ * @param $unloadAllLoadedObjects Determines whether the current instances of objects loaded from the AssetBundle will also be unloaded.
225
+ */
226
+ public Unload ($unloadAllLoadedObjects: boolean) : void
227
+ /** Unloads assets in the bundle.
228
+ * @returns Asynchronous unload request for an AssetBundle.
229
+ */
230
+ public UnloadAsync ($unloadAllLoadedObjects: boolean) : UnityEngine.AssetBundleUnloadOperation
231
+ /** Return all Asset names in the AssetBundle.
232
+ */
233
+ public GetAllAssetNames () : System.Array$1<string>
234
+ /** Return all the names of Scenes in the AssetBundle.
235
+ */
236
+ public GetAllScenePaths () : System.Array$1<string>
237
+ /** Asynchronously recompress a downloaded/stored AssetBundle from one BuildCompression to another.
238
+ * @param $inputPath Path to the AssetBundle to recompress.
239
+ * @param $outputPath Path to the recompressed AssetBundle to be generated. Can be the same as inputPath.
240
+ * @param $method The compression method, level and blocksize to use during recompression. Only some BuildCompression types are supported (see note).
241
+ * @param $expectedCRC CRC of the AssetBundle to test against. Testing this requires additional file reading and computation. Pass in 0 to skip this check. Unity does not compute a CRC when the source and destination BuildCompression are the same, so no CRC verification takes place (see note).
242
+ * @param $priority The priority at which the recompression operation should run. This sets thread priority during the operation and does not effect the order in which operations are performed. Recompression operations run on a background worker thread.
243
+ */
244
+ public static RecompressAssetBundleAsync ($inputPath: string, $outputPath: string, $method: UnityEngine.BuildCompression, $expectedCRC?: number, $priority?: UnityEngine.ThreadPriority) : UnityEngine.AssetBundleRecompressOperation
245
+ }
246
+ /** Asynchronous load request for an AssetBundle.
247
+ */
248
+ class AssetBundleCreateRequest extends UnityEngine.AsyncOperation
249
+ {
250
+ protected [__keep_incompatibility]: never;
251
+ /** Asset object being loaded (Read Only).
252
+ */
253
+ public get assetBundle(): UnityEngine.AssetBundle;
254
+ public constructor ()
255
+ }
256
+ /** Asynchronous load request from an AssetBundle.
257
+ */
258
+ class AssetBundleRequest extends UnityEngine.ResourceRequest
259
+ {
260
+ protected [__keep_incompatibility]: never;
261
+ /** Asset object being loaded (Read Only).
262
+ */
263
+ public get asset(): UnityEngine.Object;
264
+ /** Asset objects with sub assets being loaded. (Read Only)
265
+ */
266
+ public get allAssets(): System.Array$1<UnityEngine.Object>;
267
+ public constructor ()
268
+ }
269
+ /** Async unload operation for an AssetBundle.
270
+ */
271
+ class AssetBundleUnloadOperation extends UnityEngine.AsyncOperation
272
+ {
273
+ protected [__keep_incompatibility]: never;
274
+ /** Synchronously waits for the operation to complete.
275
+ */
276
+ public WaitForCompletion () : void
277
+ public constructor ()
278
+ }
279
+ /** Asynchronous AssetBundle recompression from one compression method and level to another.
280
+ */
281
+ class AssetBundleRecompressOperation extends UnityEngine.AsyncOperation
282
+ {
283
+ protected [__keep_incompatibility]: never;
284
+ /** A string describing the recompression operation result (Read Only).
285
+ */
286
+ public get humanReadableResult(): string;
287
+ /** Path of the AssetBundle being recompressed (Read Only).
288
+ */
289
+ public get inputPath(): string;
290
+ /** Path of the resulting recompressed AssetBundle (Read Only).
291
+ */
292
+ public get outputPath(): string;
293
+ /** Result of the recompression operation.
294
+ */
295
+ public get result(): UnityEngine.AssetBundleLoadResult;
296
+ /** True if the recompress operation is complete and was successful, otherwise false (Read Only).
297
+ */
298
+ public get success(): boolean;
299
+ public constructor ()
300
+ }
301
+ /** Manifest for all the AssetBundles in the build.
302
+ */
303
+ class AssetBundleManifest extends UnityEngine.Object
304
+ {
305
+ protected [__keep_incompatibility]: never;
306
+ /** Get all the AssetBundles in the manifest.
307
+ * @returns An array of asset bundle names.
308
+ */
309
+ public GetAllAssetBundles () : System.Array$1<string>
310
+ /** Get all the AssetBundles with variant in the manifest.
311
+ * @returns An array of asset bundle names.
312
+ */
313
+ public GetAllAssetBundlesWithVariant () : System.Array$1<string>
314
+ /** Get the hash for the given AssetBundle.
315
+ * @param $assetBundleName Name of the asset bundle.
316
+ * @returns The 128-bit hash for the asset bundle.
317
+ */
318
+ public GetAssetBundleHash ($assetBundleName: string) : UnityEngine.Hash128
319
+ /** Get the direct dependent AssetBundles for the given AssetBundle.
320
+ * @param $assetBundleName Name of the asset bundle.
321
+ * @returns Array of asset bundle names this asset bundle depends on.
322
+ */
323
+ public GetDirectDependencies ($assetBundleName: string) : System.Array$1<string>
324
+ /** Get all the dependent AssetBundles for the given AssetBundle.
325
+ * @param $assetBundleName Name of the asset bundle.
326
+ */
327
+ public GetAllDependencies ($assetBundleName: string) : System.Array$1<string>
328
+ }
329
+ }
330
+ namespace UnityEngine.Experimental.AssetBundlePatching {
331
+ class AssetBundleUtility extends System.Object
332
+ {
333
+ protected [__keep_incompatibility]: never;
334
+ public static PatchAssetBundles ($bundles: System.Array$1<UnityEngine.AssetBundle>, $filenames: System.Array$1<string>) : void
335
+ }
336
+ }
337
+ }