Class CoreUtils
  
Inheritance
System.Object
CoreUtils
 
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
 
Syntax
public static class CoreUtils
 
Fields
  
Declaration
public const int assetCreateMenuPriority1 = 230
 
Field Value
| Type | 
Description | 
| System.Int32 | 
 | 
Declaration
public const int assetCreateMenuPriority2 = 241
 
Field Value
| Type | 
Description | 
| System.Int32 | 
 | 
Declaration
public const int editMenuPriority1 = 320
 
Field Value
| Type | 
Description | 
| System.Int32 | 
 | 
Declaration
public const int editMenuPriority2 = 331
 
Field Value
| Type | 
Description | 
| System.Int32 | 
 | 
Declaration
public const int editMenuPriority3 = 342
 
Field Value
| Type | 
Description | 
| System.Int32 | 
 | 
Declaration
public const int gameObjectMenuPriority = 10
 
Field Value
| Type | 
Description | 
| System.Int32 | 
 | 
lookAtList
Declaration
public static readonly Vector3[] lookAtList
 
Field Value
| Type | 
Description | 
| Vector3[] | 
 | 
upVectorList
Declaration
public static readonly Vector3[] upVectorList
 
Field Value
| Type | 
Description | 
| Vector3[] | 
 | 
Properties
  
blackCubeTexture
Declaration
public static Cubemap blackCubeTexture { get; }
 
Property Value
clearColorAllBlack
Declaration
public static Color clearColorAllBlack { get; }
 
Property Value
emptyUAV
Declaration
public static RenderTexture emptyUAV { get; }
 
Property Value
| Type | 
Description | 
| RenderTexture | 
 | 
magentaCubeTexture
Declaration
public static Cubemap magentaCubeTexture { get; }
 
Property Value
whiteCubeTexture
Declaration
public static Cubemap whiteCubeTexture { get; }
 
Property Value
Methods
  
ClearCubemap(CommandBuffer, RenderTexture, Color, Boolean)
Declaration
public static void ClearCubemap(CommandBuffer cmd, RenderTexture renderTexture, Color clearColor, bool clearMips = false)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| RenderTexture | 
renderTexture | 
 | 
| Color | 
clearColor | 
 | 
| System.Boolean | 
clearMips | 
 | 
ClearRenderTarget(CommandBuffer, ClearFlag, Color)
Declaration
public static void ClearRenderTarget(CommandBuffer cmd, ClearFlag clearFlag, Color clearColor)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| ClearFlag | 
clearFlag | 
 | 
| Color | 
clearColor | 
 | 
ConvertLinearToActiveColorSpace(Color)
Declaration
public static Color ConvertLinearToActiveColorSpace(Color color)
 
Parameters
| Type | 
Name | 
Description | 
| Color | 
color | 
 | 
Returns
ConvertSRGBToActiveColorSpace(Color)
Declaration
public static Color ConvertSRGBToActiveColorSpace(Color color)
 
Parameters
| Type | 
Name | 
Description | 
| Color | 
color | 
 | 
Returns
CreateCubeMesh(Vector3, Vector3)
Declaration
public static Mesh CreateCubeMesh(Vector3 min, Vector3 max)
 
Parameters
| Type | 
Name | 
Description | 
| Vector3 | 
min | 
 | 
| Vector3 | 
max | 
 | 
Returns
CreateEngineMaterial(Shader)
Declaration
public static Material CreateEngineMaterial(Shader shader)
 
Parameters
| Type | 
Name | 
Description | 
| Shader | 
shader | 
 | 
Returns
| Type | 
Description | 
| Material | 
 | 
CreateEngineMaterial(String)
Declaration
public static Material CreateEngineMaterial(string shaderPath)
 
Parameters
| Type | 
Name | 
Description | 
| System.String | 
shaderPath | 
 | 
Returns
| Type | 
Description | 
| Material | 
 | 
Destroy(Object)
Declaration
public static void Destroy(Object obj)
 
Parameters
| Type | 
Name | 
Description | 
| UnityEngine.Object | 
obj | 
 | 
Destroy(Object[])
Declaration
public static void Destroy(params Object[] objs)
 
Parameters
| Type | 
Name | 
Description | 
| UnityEngine.Object[] | 
objs | 
 | 
DrawFullScreen(CommandBuffer, Material, MaterialPropertyBlock, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, MaterialPropertyBlock properties = null, int shaderPassId = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
commandBuffer | 
 | 
| Material | 
material | 
 | 
| MaterialPropertyBlock | 
properties | 
 | 
| System.Int32 | 
shaderPassId | 
 | 
DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier, MaterialPropertyBlock, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RenderTargetIdentifier colorBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
commandBuffer | 
 | 
| Material | 
material | 
 | 
| RenderTargetIdentifier | 
colorBuffer | 
 | 
| MaterialPropertyBlock | 
properties | 
 | 
| System.Int32 | 
shaderPassId | 
 | 
DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier, RenderTargetIdentifier, MaterialPropertyBlock, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthStencilBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
commandBuffer | 
 | 
| Material | 
material | 
 | 
| RenderTargetIdentifier | 
colorBuffer | 
 | 
| RenderTargetIdentifier | 
depthStencilBuffer | 
 | 
| MaterialPropertyBlock | 
properties | 
 | 
| System.Int32 | 
shaderPassId | 
 | 
DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier[], MaterialPropertyBlock, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RenderTargetIdentifier[] colorBuffers, MaterialPropertyBlock properties = null, int shaderPassId = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
commandBuffer | 
 | 
| Material | 
material | 
 | 
| RenderTargetIdentifier[] | 
colorBuffers | 
 | 
| MaterialPropertyBlock | 
properties | 
 | 
| System.Int32 | 
shaderPassId | 
 | 
DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier[], RenderTargetIdentifier, MaterialPropertyBlock, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthStencilBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
commandBuffer | 
 | 
| Material | 
material | 
 | 
| RenderTargetIdentifier[] | 
colorBuffers | 
 | 
| RenderTargetIdentifier | 
depthStencilBuffer | 
 | 
| MaterialPropertyBlock | 
properties | 
 | 
| System.Int32 | 
shaderPassId | 
 | 
GetAllAssemblyTypes()
Declaration
public static IEnumerable<Type> GetAllAssemblyTypes()
 
Returns
| Type | 
Description | 
| System.Collections.Generic.IEnumerable<Type> | 
 | 
GetRenderTargetAutoName(Int32, Int32, RenderTextureFormat, String, Boolean, Boolean, MSAASamples)
Declaration
public static string GetRenderTargetAutoName(int width, int height, RenderTextureFormat format, string name = "", bool mips = false, bool enableMSAA = false, MSAASamples msaaSamples = MSAASamples.None)
 
Parameters
| Type | 
Name | 
Description | 
| System.Int32 | 
width | 
 | 
| System.Int32 | 
height | 
 | 
| RenderTextureFormat | 
format | 
 | 
| System.String | 
name | 
 | 
| System.Boolean | 
mips | 
 | 
| System.Boolean | 
enableMSAA | 
 | 
| MSAASamples | 
msaaSamples | 
 | 
Returns
| Type | 
Description | 
| System.String | 
 | 
GetTextureAutoName(Int32, Int32, TextureFormat, TextureDimension, String, Boolean, Int32)
Declaration
public static string GetTextureAutoName(int width, int height, TextureFormat format, TextureDimension dim = null, string name = "", bool mips = false, int depth = 0)
 
Parameters
| Type | 
Name | 
Description | 
| System.Int32 | 
width | 
 | 
| System.Int32 | 
height | 
 | 
| TextureFormat | 
format | 
 | 
| TextureDimension | 
dim | 
 | 
| System.String | 
name | 
 | 
| System.Boolean | 
mips | 
 | 
| System.Int32 | 
depth | 
 | 
Returns
| Type | 
Description | 
| System.String | 
 | 
IsPostProcessingActive(PostProcessLayer)
Declaration
public static bool IsPostProcessingActive(PostProcessLayer layer)
 
Parameters
| Type | 
Name | 
Description | 
| PostProcessLayer | 
layer | 
 | 
Returns
| Type | 
Description | 
| System.Boolean | 
 | 
IsTemporalAntialiasingActive(PostProcessLayer)
Declaration
public static bool IsTemporalAntialiasingActive(PostProcessLayer layer)
 
Parameters
| Type | 
Name | 
Description | 
| PostProcessLayer | 
layer | 
 | 
Returns
| Type | 
Description | 
| System.Boolean | 
 | 
Partition(UInt32[], Int32, Int32)
Declaration
public static int Partition(uint[] numbers, int left, int right)
 
Parameters
| Type | 
Name | 
Description | 
| System.UInt32[] | 
numbers | 
 | 
| System.Int32 | 
left | 
 | 
| System.Int32 | 
right | 
 | 
Returns
| Type | 
Description | 
| System.Int32 | 
 | 
QuickSort(UInt32[], Int32, Int32)
Declaration
public static void QuickSort(uint[] arr, int left, int right)
 
Parameters
| Type | 
Name | 
Description | 
| System.UInt32[] | 
arr | 
 | 
| System.Int32 | 
left | 
 | 
| System.Int32 | 
right | 
 | 
SafeRelease(ComputeBuffer)
Declaration
public static void SafeRelease(ComputeBuffer buffer)
 
Parameters
| Type | 
Name | 
Description | 
| ComputeBuffer | 
buffer | 
 | 
SelectKeyword(Material, String, String, Boolean)
Declaration
public static void SelectKeyword(Material material, string keyword1, string keyword2, bool enableFirst)
 
Parameters
| Type | 
Name | 
Description | 
| Material | 
material | 
 | 
| System.String | 
keyword1 | 
 | 
| System.String | 
keyword2 | 
 | 
| System.Boolean | 
enableFirst | 
 | 
SelectKeyword(Material, String[], Int32)
Declaration
public static void SelectKeyword(Material material, string[] keywords, int enabledKeywordIndex)
 
Parameters
| Type | 
Name | 
Description | 
| Material | 
material | 
 | 
| System.String[] | 
keywords | 
 | 
| System.Int32 | 
enabledKeywordIndex | 
 | 
SetKeyword(CommandBuffer, String, Boolean)
Declaration
public static void SetKeyword(CommandBuffer cmd, string keyword, bool state)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| System.String | 
keyword | 
 | 
| System.Boolean | 
state | 
 | 
SetKeyword(Material, String, Boolean)
Declaration
public static void SetKeyword(Material m, string keyword, bool state)
 
Parameters
| Type | 
Name | 
Description | 
| Material | 
m | 
 | 
| System.String | 
keyword | 
 | 
| System.Boolean | 
state | 
 | 
SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, Int32, CubemapFace, Int32)
Declaration
public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| RenderTargetIdentifier | 
colorBuffer | 
 | 
| RenderTargetIdentifier | 
depthBuffer | 
 | 
| System.Int32 | 
miplevel | 
 | 
| CubemapFace | 
cubemapFace | 
 | 
| System.Int32 | 
depthSlice | 
 | 
SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, ClearFlag, Color, Int32, CubemapFace, Int32)
Declaration
public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| RenderTargetIdentifier | 
colorBuffer | 
 | 
| RenderTargetIdentifier | 
depthBuffer | 
 | 
| ClearFlag | 
clearFlag | 
 | 
| Color | 
clearColor | 
 | 
| System.Int32 | 
miplevel | 
 | 
| CubemapFace | 
cubemapFace | 
 | 
| System.Int32 | 
depthSlice | 
 | 
SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, ClearFlag, Int32, CubemapFace, Int32)
Declaration
public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| RenderTargetIdentifier | 
colorBuffer | 
 | 
| RenderTargetIdentifier | 
depthBuffer | 
 | 
| ClearFlag | 
clearFlag | 
 | 
| System.Int32 | 
miplevel | 
 | 
| CubemapFace | 
cubemapFace | 
 | 
| System.Int32 | 
depthSlice | 
 | 
SetRenderTarget(CommandBuffer, RenderTargetIdentifier, ClearFlag, Color, Int32, CubemapFace, Int32)
Declaration
public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier buffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| RenderTargetIdentifier | 
buffer | 
 | 
| ClearFlag | 
clearFlag | 
 | 
| Color | 
clearColor | 
 | 
| System.Int32 | 
miplevel | 
 | 
| CubemapFace | 
cubemapFace | 
 | 
| System.Int32 | 
depthSlice | 
 | 
SetRenderTarget(CommandBuffer, RenderTargetIdentifier, ClearFlag, Int32, CubemapFace, Int32)
Declaration
public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier buffer, ClearFlag clearFlag = ClearFlag.None, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = 0)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| RenderTargetIdentifier | 
buffer | 
 | 
| ClearFlag | 
clearFlag | 
 | 
| System.Int32 | 
miplevel | 
 | 
| CubemapFace | 
cubemapFace | 
 | 
| System.Int32 | 
depthSlice | 
 | 
SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier)
Declaration
public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| RenderTargetIdentifier[] | 
colorBuffers | 
 | 
| RenderTargetIdentifier | 
depthBuffer | 
 | 
SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier, ClearFlag)
Declaration
public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag = ClearFlag.None)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| RenderTargetIdentifier[] | 
colorBuffers | 
 | 
| RenderTargetIdentifier | 
depthBuffer | 
 | 
| ClearFlag | 
clearFlag | 
 | 
SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RenderTargetIdentifier, ClearFlag, Color)
Declaration
public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, Color clearColor)
 
Parameters
| Type | 
Name | 
Description | 
| CommandBuffer | 
cmd | 
 | 
| RenderTargetIdentifier[] | 
colorBuffers | 
 | 
| RenderTargetIdentifier | 
depthBuffer | 
 | 
| ClearFlag | 
clearFlag | 
 | 
| Color | 
clearColor | 
 |