docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    ResourceReloader
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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)
    • 1 hasChange: True if something have been reloaded.
    • 2 assetDatabaseNotReady: True if the issue preventing loading is due to state of AssetDatabase
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)