StaticduplicateDeep-clones a loaded resource, assigns the clone a new UUID, and registers a loaded handle for it. The duplicate is not persisted to a package automatically.
Loaded resource to duplicate.
The independent duplicate, or null if the input is null or not loaded.
StaticgetGets a ResourceHandle for the Resource with the specified uuid.
UUID of the resource.
A resource handle, or null if the resource cannot be found.
The resource may be unloaded when the handle is returned. Check ResourceHandle#isLoaded before accessing ResourceHandle#value when a blocking load is not acceptable.
To ensure that the resource is loaded, use Resources#loadHandleBackground instead.
StaticgetGets a ResourceHandle for the Resource with the specified UUID.
A typed resource handle, or null if the resource cannot be found.
Use Resources.get.
StaticisChecks if the packages for the provided Resource and optionally its dependencies are present locally. They may not be present if running in online mode and they haven't been downloaded yet.
UUID of the resource to check.
Determines for which dependencies to check, if any.
True if all the requested packages are available locally.
StaticloadLoads a Resource with the specified UUID synchronously. If the resource is already loaded, its existing instance is returned.
Expected resource type.
Unique identifier of the resource to load.
Optionalflags: EnumValue<ResourceLoadFlag>
Optional flags used to control the load process.
The loaded resource, or null if it cannot be found or does not match type.
StaticloadStaticloadQueues a background load for the resource with the specified UUID and immediately returns its ResourceHandle. If the resource is already loaded, the returned handle references the existing instance. Use ResourceHandle#isLoaded to determine when loading has completed and ResourceHandle#getLoadProgress to track its progress.
Expected resource type.
Unique identifier of the resource to load.
Optionalflags: EnumValue<ResourceLoadFlag>
Optional flags used to control the load process.
The resource handle, or null if the resource cannot be found.
The generic type is not verified because the resource may still be unloaded when this method returns. The caller
must ensure that the UUID identifies the requested type. Use Resources.loadAsync when runtime type
verification is required.
StaticreleaseReleases an internal reference held by the resource system for the specified Resource or ResourceHandle. This allows a resource loaded with ResourceLoadFlag.KeepInternalRef to be unloaded after all external references are released.
Resource instance or handle whose internal reference should be released.
Call Resources.unloadUnused to release all resources that no longer have external references when fine-grained control is not required.
StaticshouldChecks if the resource should be cloned before queuing a save operation.
Type of the resource.
True if the resource should be cloned.
StaticunloadStaticupdateReplaces the object referenced by handle with a deep clone of resourceToClone. All copies of the target handle observe
the replacement. The clone keeps the target handle's UUID and owns independent streaming data.
Loaded target handle whose referenced object will be replaced.
Loaded resource to clone. Its runtime type must match the target resource type.
Static ReadonlyonAn event fired whenever a resource is marked as dirty.
Static ReadonlyonTriggered after a resource and its requested dependencies finish loading successfully.
Static ReadonlyonTriggered when package metadata makes a resource UUID available for loading.
Static ReadonlyonTriggered when unloading or updating a package makes a resource UUID unavailable for future loads. An already loaded resource may remain alive until its references are released.
Static ReadonlyonTriggered after a loaded resource is destroyed and its handle data is cleared.
Static ReadonlyonTriggered after the object referenced by an existing handle is replaced. The handle keeps the same UUID.
Static ReadonlyonTriggered after a resource handle is reverted to the representation stored in its package.
Runtime API for acquiring ResourceHandle objects and loading or unloading Resource instances.
Use Resources.get to acquire a handle without guaranteeing that the resource is loaded. A handle remains valid while its resource is unloaded and exposes ResourceHandle#isLoaded, ResourceHandle#getLoadProgress, and ResourceHandle#value. Accessing ResourceHandle#value may perform a blocking load.
Use Resources.load for a synchronous typed load, Resources.loadAsync for an asynchronous typed load, or Resources.loadHandleBackground to queue a background load and immediately receive a handle. Resource discovery and editor-side library mutations are provided by Editor.ProjectLibrary.