docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CoreUtils

    Set of utility functions for the Core Scriptable Render Pipeline Library

    Inheritance
    object
    CoreUtils
    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 CoreUtils

    Fields

    Name Description
    assetCreateMenuPriority1

    Asset Create Menu priority 1

    assetCreateMenuPriority2

    Asset Create Menu priority 2

    assetCreateMenuPriority3

    Asset Create Menu priority 3

    editMenuPriority1

    Edit Menu priority 1

    editMenuPriority2

    Edit Menu priority 2

    editMenuPriority3

    Edit Menu priority 3

    editMenuPriority4

    Edit Menu priority 4

    gameObjectMenuPriority

    Game Object Menu priority

    lookAtList

    List of look at matrices for cubemap faces. Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/bb204881(v=vs.85).aspx

    upVectorList

    List of up vectors for cubemap faces. Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/bb204881(v=vs.85).aspx

    Properties

    Name Description
    blackCubeTexture

    Black cubemap texture.

    blackVolumeTexture

    Black 3D texture.

    emptyUAV

    Empty 1x1 texture usable as a dummy UAV.

    magentaCubeTexture

    Magenta cubemap texture.

    magentaCubeTextureArray

    Black cubemap array texture.

    whiteCubeTexture

    White cubemap texture.

    Methods

    Name Description
    AreAnimatedMaterialsEnabled(Camera)

    Returns true if "Animated Materials" are enabled for the view associated with the given camera.

    ArePostProcessesEnabled(Camera)

    Returns true if "Post Processes" are enabled for the view associated with the given camera.

    ClearCubemap(CommandBuffer, RenderTexture, Color, bool)

    Clear a cubemap render texture.

    ClearRenderTarget(CommandBuffer, ClearFlag, Color)

    Clear the currently bound render texture.

    ConvertLinearToActiveColorSpace(Color)

    Converts the provided linear color to the current active color space.

    ConvertSRGBToActiveColorSpace(Color)

    Converts the provided sRGB color to the current active color space.

    CreateCubeMesh(Vector3, Vector3)

    Creates a cube mesh.

    CreateEngineMaterial(string)

    Creates a Material with the provided shader path. hideFlags will be set to HideFlags.HideAndDontSave.

    CreateEngineMaterial(Shader)

    Creates a Material with the provided shader. hideFlags will be set to HideFlags.HideAndDontSave.

    Destroy(Object)

    Destroys a UnityObject safely.

    DrawFullScreen(CommandBuffer, Material, MaterialPropertyBlock, int)

    Draws a full screen triangle.

    DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier, MaterialPropertyBlock, int)

    Draws a full screen triangle.

    DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier, RenderTargetIdentifier, MaterialPropertyBlock, int)

    Draws a full screen triangle.

    DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier[], MaterialPropertyBlock, int)

    Draws a full screen triangle.

    DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier[], RenderTargetIdentifier, MaterialPropertyBlock, int)

    Draws a full screen triangle.

    DrawRendererList(ScriptableRenderContext, CommandBuffer, RendererList)

    Draw a renderer list.

    EnsureFolderTreeInAssetFilePath(string)

    Create any missing folder in the file path given. Path must use '/' separator

    GetAllAssemblyTypes()

    Returns all assembly types.

    GetAllTypesDerivedFrom<T>()

    Returns a list of types that inherit from the provided type.

    GetLastEnumValue<T>()

    Get the last declared value from an enum Type

    GetMipCount(int)

    Gets the Mip Count for a given size

    GetMipCount(float)

    Gets the Mip Count for a given size

    GetRenderTargetAutoName(int, int, int, GraphicsFormat, string, bool, bool, MSAASamples)

    Generate a name based on render texture parameters.

    GetRenderTargetAutoName(int, int, int, GraphicsFormat, TextureDimension, string, bool, bool, MSAASamples, bool)

    Generate a name based on render texture parameters.

    GetRenderTargetAutoName(int, int, int, RenderTextureFormat, string, bool, bool, MSAASamples)

    Generate a name based on render texture parameters.

    GetTextureAutoName(int, int, GraphicsFormat, TextureDimension, string, bool, int)

    Generate a name based on texture parameters.

    GetTextureAutoName(int, int, TextureFormat, TextureDimension, string, bool, int)

    Generate a name based on texture parameters.

    GetTextureHash(Texture)

    Compute a hash of texture properties.

    HasFlag<T>(T, T)

    Bitfield flag test.

    IsLightOverlapDebugEnabled(Camera)

    Returns true if the "Light Overlap" scene view draw mode is enabled.

    IsSceneFilteringEnabled()

    Returns true if any Scene view is using the Scene filtering.

    IsSceneLightingDisabled(Camera)

    Returns true if "Scene Lighting" is enabled for the view associated with the given camera.

    IsSceneViewFogEnabled(Camera)

    Returns true if "Fog" is enabled for the view associated with the given camera.

    IsSceneViewPrefabStageContextHidden()

    Returns true if the currently opened prefab stage context is set to Hidden.

    LoadAllAssets<T>(string, bool)
    PreviousPowerOfTwo(int)

    Branchless previous power of two.

    SafeRelease(ComputeBuffer)

    Safely release a Compute Buffer.

    SafeRelease(GraphicsBuffer)

    Safely release a Graphics Buffer.

    SetKeyword(ComputeShader, string, bool)

    Set a keyword to a compute shader

    SetKeyword(BaseCommandBuffer, string, bool)

    Set a global keyword using a RasterCommandBuffer

    SetKeyword(Material, string, bool)

    Set a keyword immediatly on a Material.

    SetKeyword(CommandBuffer, string, bool)

    Set a global keyword using a CommandBuffer

    SetRenderTarget(CommandBuffer, RTHandle, ClearFlag, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    SetRenderTarget(CommandBuffer, RTHandle, ClearFlag, Color, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    SetRenderTarget(CommandBuffer, RTHandle, RTHandle, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    SetRenderTarget(CommandBuffer, RTHandle, RTHandle, ClearFlag, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    SetRenderTarget(CommandBuffer, RTHandle, RTHandle, ClearFlag, Color, int, CubemapFace, int)

    Setup the current render texture using an RTHandle

    SetRenderTarget(CommandBuffer, RTHandle, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RTHandle, RenderBufferLoadAction, RenderBufferStoreAction, RTHandle, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, ClearFlag, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, ClearFlag, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, ClearFlag, Color, int, CubemapFace, int)

    Set the current render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandle)

    Set the current multiple render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandle, ClearFlag)

    Set the current multiple render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandle, ClearFlag, Color)

    Set the current multiple render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier)

    Set the current multiple render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier, ClearFlag)

    Set the current multiple render texture.

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier, ClearFlag, Color)

    Set the current multiple render texture.

    SetViewport(CommandBuffer, RTHandle)

    Setup the viewport to the size of the provided RTHandle.

    Swap<T>(ref T, ref T)

    Swaps two values.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)