docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RayTracingResources

    Utility shaders needed by a RayTracingContext to operate.

    Inheritance
    object
    RayTracingResources
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.UnifiedRayTracing
    Assembly: Unity.UnifiedRayTracing.Runtime.dll
    Syntax
    public class RayTracingResources

    Methods

    Load()

    Intializes the RayTracingResources.

    Declaration
    public void Load()
    Remarks

    This API works only in the Unity Editor, not at runtime.

    LoadFromAssetBundle(AssetBundle)

    Intializes the RayTracingResources by loading its utility shaders from an AssetBundle.

    Declaration
    public void LoadFromAssetBundle(AssetBundle assetBundle)
    Parameters
    Type Name Description
    AssetBundle assetBundle

    The AssetBundle to load the shaders from.

    Remarks

    The necessary shaders are configured to belong to the unifiedraytracing AssetBundle which can be built by calling BuildAssetBundles(string, BuildAssetBundleOptions, BuildTarget)

    LoadFromRenderPipelineResources()

    Intializes the RayTracingResources by loading its utility shaders via GraphicsSettings.

    Declaration
    public bool LoadFromRenderPipelineResources()
    Returns
    Type Description
    bool

    Whether the resources were successfully loaded.

    Remarks

    This method only works in projects that use Scriptable Render Pipeline.

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    In This Article
    Back to top
    Copyright © 2025 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)