Class ResourceReloader
The resources that need to be reloaded in Editor can live in Runtime. The reload call should only be done in Editor context though but it could be called from runtime entities.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public static class ResourceReloader
Methods
ReloadAllNullIn(object, string)
Looks for resources in the given container
object and reload the ones
that are missing or broken.
Declaration
public static bool ReloadAllNullIn(object container, string basePath)
Parameters
Type | Name | Description |
---|---|---|
object | container | The object containing reload-able resources |
string | basePath | The base path for the package |
Returns
Type | Description |
---|---|
bool | True if something have been reloaded. |
TryReloadAllNullIn(object, string)
Looks for resources in the given container
object and reload the ones
that are missing or broken.
This version will still return null value without throwing error if the issue is due to
AssetDatabase being not ready. But in this case the assetDatabaseNotReady result will be true.
Declaration
public static (bool hasChange, bool assetDatabaseNotReady) TryReloadAllNullIn(object container, string basePath)
Parameters
Type | Name | Description |
---|---|---|
object | container | The object containing reload-able resources |
string | basePath | The base path for the package |
Returns
Type | Description |
---|---|
(bool hasChange, bool assetDatabaseNotReady) |
|