StaticduplicateStaticgetGets a ResourceHandle for the Resource at the specified path.
Path of the resource, relative to project directory.
A resource reference, or null if resource cannot be found.
Gets a ResourceHandle for the Resource with the specified uuid.
UUID of the resource.
A resource reference, or null if resource cannot be found.
StaticgetGets a ResourceHandle for the Resource with the specified UUID.
A resource reference, or null if resource cannot be found.
StaticgetReturns the loading progress of a Resource that's being asynchronously loaded.
Resource whose load progress to check.
OptionalincludeDependencies: booleanIf false the progress will reflect the load progress only for this individual resource. If true the progress will reflect load progress of this resource and all of its dependencies.
Load progress in range [0, 1].
StaticisChecks is the specific animation resource dirty and needs saving.
True if the resource requires saving, false otherwise.
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.
StaticisChecks is the specific resource dirty and needs saving.
Resource to check.
True if the resource requires saving, false otherwise.
StaticloadLoads a Resource from the specified path. If resource is already loaded an existing instance is returned.
The Type of the resource.
Path of the resource, relative to game directory. If running from editor this will be relative to the project library. If a sub-resource within a file is needed, append the name of the subresource to the path (for example mymesh.fbx/my_animation).
Optionalflags: EnumValue<ResourceLoadFlag, number>Optional flags used to control the load process.
Loaded resource, or null if resource cannot be found.
Loads a Resource with the specified UUID. If resource is already loaded an existing instance is returned.
Loaded resource, or null if resource cannot be found.
StaticloadStaticloadLoads a Resource from the specified path asynchonously in the background (on a separate thread). If resource is already loaded an existing instance is returned. Use ResourceHandle.isLoaded to confirm the resource has been loaded before using it. Use getLoadProgress to track the loading progress of the resource.
The Type of the resource.
Path of the resource, relative to game directory. If running from editor this will be relative to the project library. If a sub-resource within a file is needed, append the name of the subresource to the path (for example mymesh.fbx/my_animation).
Optionalflags: EnumValue<ResourceLoadFlag, number>Optional flags used to control the load process.
Loaded resource, or null if resource cannot be found.
If running outside of the editor you must make sure to mark that the resource gets included in the build. If running inside the editor this has similar functionality as if loading using the project library.
This is load does not guarantee that the loaded resource matches the type as the load finishes in the background.
The caller is responsible to ensure that the loaded resource matches the requested type.
It is recommended to use loadAsync as an alternative API that provides type guarantees.
Loads a Resource with the specified UUID asynchonously in the background (on a separate thread). If resource is already loaded an existing instance is returned. Use ResourceHandle.isLoaded to confirm the resource has been loaded before using it. Use getLoadProgress to track the loading progress of the resource.
The Type of the resource.
Unique identifier of the resource to load.
Optionalflags: EnumValue<ResourceLoadFlag, number>Optional flags used to control the load process.
Loaded resource, or null if resource cannot be found.
If running outside of the editor you must make sure to mark that the resource gets included in the build. If running inside the editor this has similar functionality as if loading using the project library.
This is load does not guarantee that the loaded resource matches the type as the load finishes in the background.
The caller is responsible to ensure that the loaded resource matches the requested type.
It is recommended to use loadAsync as an alternative API that provides type guarantees.
StaticreleaseReleases an internal reference to the Resource held by the resources system. This allows the resource to be unloaded when it goes out of scope, if the resource was loaded with "keepLoaded" parameter.
Resource to release
StaticrevertStaticsetStaticsetMarks a resource in the current project as dirty.
Resource to mark as dirty.
OptionalisDirty: booleanWhether the resource is dirty or it should be marked as clean.
StaticshouldChecks if the resource should be cloned before queuing a save operation.
Type of the resource.
True if the resource should be cloned.
StaticunloadUnloads all resources that are no longer referenced.
This only applies to resources loaded with ResourceLoadFlag.KeepInternalRef flag, as all other resources will be unloaded when they go out of scope.
StaticupdateUpdates an existing resource handle with a new resource. The handleToClone will be cloned to as new object for handle.
Caller must ensure that new resource type matches the original resource type.
Static ReadonlyonAn event fired whenever a resource is marked as dirty.
Static ReadonlyonCalled when the resource has been successfully loaded.
Static ReadonlyonCalled when the resource has been destroyed. Provides UUID of the destroyed resource.
Static ReadonlyonCalled when the internal resource the handle is pointing to has changed.
Static ReadonlyonCalled when the internal resource the handle is pointing to has been reverted.
The Resources class provides APIs to dynamically load and unload Resource objects at runtime.