Class RayTracingResources
Utility shaders needed by a RayTracingContext to operate.
Inherited Members
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.