Class RuntimeUtilities
Inheritance
System.Object
RuntimeUtilities
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Syntax
public static class RuntimeUtilities
Properties
blackTexture
Declaration
public static Texture2D blackTexture { get; }
Property Value
Type |
Description |
Texture2D |
|
blackTexture3D
Declaration
public static Texture3D blackTexture3D { get; }
Property Value
Type |
Description |
Texture3D |
|
copyMaterial
Declaration
public static Material copyMaterial { get; }
Property Value
Type |
Description |
Material |
|
copySheet
Declaration
public static PropertySheet copySheet { get; }
Property Value
copyStdMaterial
Declaration
public static Material copyStdMaterial { get; }
Property Value
Type |
Description |
Material |
|
defaultHDRRenderTextureFormat
Declaration
public static RenderTextureFormat defaultHDRRenderTextureFormat { get; }
Property Value
Type |
Description |
RenderTextureFormat |
|
fullscreenTriangle
Declaration
public static Mesh fullscreenTriangle { get; }
Property Value
isAndroidOpenGL
Declaration
public static bool isAndroidOpenGL { get; }
Property Value
Type |
Description |
System.Boolean |
|
isLinearColorSpace
Declaration
public static bool isLinearColorSpace { get; }
Property Value
Type |
Description |
System.Boolean |
|
isSinglePassStereoEnabled
Declaration
public static bool isSinglePassStereoEnabled { get; }
Property Value
Type |
Description |
System.Boolean |
|
isVREnabled
Declaration
public static bool isVREnabled { get; }
Property Value
Type |
Description |
System.Boolean |
|
scriptableRenderPipelineActive
Declaration
public static bool scriptableRenderPipelineActive { get; }
Property Value
Type |
Description |
System.Boolean |
|
supportsDeferredShading
Declaration
public static bool supportsDeferredShading { get; }
Property Value
Type |
Description |
System.Boolean |
|
supportsDepthNormals
Declaration
public static bool supportsDepthNormals { get; }
Property Value
Type |
Description |
System.Boolean |
|
transparentTexture
Declaration
public static Texture2D transparentTexture { get; }
Property Value
Type |
Description |
Texture2D |
|
transparentTexture3D
Declaration
public static Texture3D transparentTexture3D { get; }
Property Value
Type |
Description |
Texture3D |
|
whiteTexture
Declaration
public static Texture2D whiteTexture { get; }
Property Value
Type |
Description |
Texture2D |
|
whiteTexture3D
Declaration
public static Texture3D whiteTexture3D { get; }
Property Value
Type |
Description |
Texture3D |
|
Methods
BlitFullscreenTriangle(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, RenderTargetIdentifier, PropertySheet, Int32, Boolean)
Declaration
public static void BlitFullscreenTriangle(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, RenderTargetIdentifier depth, PropertySheet propertySheet, int pass, bool clear = false)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RenderTargetIdentifier |
source |
|
RenderTargetIdentifier |
destination |
|
RenderTargetIdentifier |
depth |
|
PropertySheet |
propertySheet |
|
System.Int32 |
pass |
|
System.Boolean |
clear |
|
BlitFullscreenTriangle(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, Boolean)
Declaration
public static void BlitFullscreenTriangle(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, bool clear = false)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RenderTargetIdentifier |
source |
|
RenderTargetIdentifier |
destination |
|
System.Boolean |
clear |
|
BlitFullscreenTriangle(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, PropertySheet, Int32, RenderBufferLoadAction)
Declaration
public static void BlitFullscreenTriangle(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, PropertySheet propertySheet, int pass, RenderBufferLoadAction loadAction)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RenderTargetIdentifier |
source |
|
RenderTargetIdentifier |
destination |
|
PropertySheet |
propertySheet |
|
System.Int32 |
pass |
|
RenderBufferLoadAction |
loadAction |
|
BlitFullscreenTriangle(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, PropertySheet, Int32, Boolean)
Declaration
public static void BlitFullscreenTriangle(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, PropertySheet propertySheet, int pass, bool clear = false)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RenderTargetIdentifier |
source |
|
RenderTargetIdentifier |
destination |
|
PropertySheet |
propertySheet |
|
System.Int32 |
pass |
|
System.Boolean |
clear |
|
BlitFullscreenTriangle(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier[], RenderTargetIdentifier, PropertySheet, Int32, Boolean)
Declaration
public static void BlitFullscreenTriangle(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier[] destinations, RenderTargetIdentifier depth, PropertySheet propertySheet, int pass, bool clear = false)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RenderTargetIdentifier |
source |
|
RenderTargetIdentifier[] |
destinations |
|
RenderTargetIdentifier |
depth |
|
PropertySheet |
propertySheet |
|
System.Int32 |
pass |
|
System.Boolean |
clear |
|
BlitFullscreenTriangle(Texture, RenderTexture, Material, Int32)
Declaration
public static void BlitFullscreenTriangle(Texture source, RenderTexture destination, Material material, int pass)
Parameters
Type |
Name |
Description |
Texture |
source |
|
RenderTexture |
destination |
|
Material |
material |
|
System.Int32 |
pass |
|
BuiltinBlit(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier)
Declaration
public static void BuiltinBlit(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier dest)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
UnityEngine.Rendering.RenderTargetIdentifier |
source |
|
UnityEngine.Rendering.RenderTargetIdentifier |
dest |
|
BuiltinBlit(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, Material, Int32)
Declaration
public static void BuiltinBlit(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier dest, Material mat, int pass = 0)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
UnityEngine.Rendering.RenderTargetIdentifier |
source |
|
UnityEngine.Rendering.RenderTargetIdentifier |
dest |
|
Material |
mat |
|
System.Int32 |
pass |
|
CopyTexture(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier)
Declaration
public static void CopyTexture(CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RenderTargetIdentifier |
source |
|
RenderTargetIdentifier |
destination |
|
CreateIfNull<T>(ref T)
Declaration
public static void CreateIfNull<T>(ref T obj)where T : class, new ()
Parameters
Type |
Name |
Description |
T |
obj |
|
Type Parameters
Destroy(Object)
Declaration
public static void Destroy(Object obj)
Parameters
Type |
Name |
Description |
UnityEngine.Object |
obj |
|
DestroyProfile(PostProcessProfile, Boolean)
Declaration
public static void DestroyProfile(PostProcessProfile profile, bool destroyEffects)
Parameters
DestroyVolume(PostProcessVolume, Boolean, Boolean)
Declaration
public static void DestroyVolume(PostProcessVolume volume, bool destroyProfile, bool destroyGameObject = false)
Parameters
Type |
Name |
Description |
PostProcessVolume |
volume |
|
System.Boolean |
destroyProfile |
|
System.Boolean |
destroyGameObject |
|
Exp2(Single)
Declaration
public static float Exp2(float x)
Parameters
Type |
Name |
Description |
System.Single |
x |
|
Returns
Type |
Description |
System.Single |
|
GenerateJitteredProjectionMatrixFromOriginal(PostProcessRenderContext, Matrix4x4, Vector2)
Declaration
public static Matrix4x4 GenerateJitteredProjectionMatrixFromOriginal(PostProcessRenderContext context, Matrix4x4 origProj, Vector2 jitter)
Parameters
Returns
Type |
Description |
Matrix4x4 |
|
GetAllAssemblyTypes()
Declaration
public static IEnumerable<Type> GetAllAssemblyTypes()
Returns
Type |
Description |
IEnumerable<System.Type> |
|
GetAllSceneObjects<T>()
Declaration
public static IEnumerable<T> GetAllSceneObjects<T>()where T : Component
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
GetAttribute<T>(Type)
Declaration
public static T GetAttribute<T>(this Type type)where T : Attribute
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
Type Parameters
GetFieldPath<TType, TValue>(Expression<Func<TType, TValue>>)
Declaration
public static string GetFieldPath<TType, TValue>(Expression<Func<TType, TValue>> expr)
Parameters
Type |
Name |
Description |
Expression<System.Func<TType, TValue>> |
expr |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
Name |
Description |
TType |
|
TValue |
|
GetJitteredOrthographicProjectionMatrix(Camera, Vector2)
Declaration
public static Matrix4x4 GetJitteredOrthographicProjectionMatrix(Camera camera, Vector2 offset)
Parameters
Type |
Name |
Description |
Camera |
camera |
|
Vector2 |
offset |
|
Returns
Type |
Description |
Matrix4x4 |
|
GetJitteredPerspectiveProjectionMatrix(Camera, Vector2)
Declaration
public static Matrix4x4 GetJitteredPerspectiveProjectionMatrix(Camera camera, Vector2 offset)
Parameters
Type |
Name |
Description |
Camera |
camera |
|
Vector2 |
offset |
|
Returns
Type |
Description |
Matrix4x4 |
|
GetLutStrip(Int32)
Declaration
public static Texture2D GetLutStrip(int size)
Parameters
Type |
Name |
Description |
System.Int32 |
size |
|
Returns
Type |
Description |
Texture2D |
|
GetMemberAttributes<TType, TValue>(Expression<Func<TType, TValue>>)
Declaration
public static Attribute[] GetMemberAttributes<TType, TValue>(Expression<Func<TType, TValue>> expr)
Parameters
Type |
Name |
Description |
Expression<System.Func<TType, TValue>> |
expr |
|
Returns
Type |
Description |
System.Attribute[] |
|
Type Parameters
Name |
Description |
TType |
|
TValue |
|
GetParentObject(String, Object)
Declaration
public static object GetParentObject(string path, object obj)
Parameters
Type |
Name |
Description |
System.String |
path |
|
System.Object |
obj |
|
Returns
Type |
Description |
System.Object |
|
isFloatingPointFormat(RenderTextureFormat)
Declaration
public static bool isFloatingPointFormat(RenderTextureFormat format)
Parameters
Type |
Name |
Description |
RenderTextureFormat |
format |
|
Returns
Type |
Description |
System.Boolean |
|
IsPostProcessingActive(PostProcessLayer)
Declaration
public static bool IsPostProcessingActive(PostProcessLayer layer)
Parameters
Returns
Type |
Description |
System.Boolean |
|
IsResolvedDepthAvailable(Camera)
Declaration
public static bool IsResolvedDepthAvailable(Camera camera)
Parameters
Type |
Name |
Description |
Camera |
camera |
|
Returns
Type |
Description |
System.Boolean |
|
IsTemporalAntialiasingActive(PostProcessLayer)
Declaration
public static bool IsTemporalAntialiasingActive(PostProcessLayer layer)
Parameters
Returns
Type |
Description |
System.Boolean |
|
SetRenderTargetWithLoadStoreAction(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction)
Declaration
public static void SetRenderTargetWithLoadStoreAction(this CommandBuffer cmd, RenderTargetIdentifier rt, RenderBufferLoadAction loadAction, RenderBufferStoreAction storeAction)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RenderTargetIdentifier |
rt |
|
RenderBufferLoadAction |
loadAction |
|
RenderBufferStoreAction |
storeAction |
|
SetRenderTargetWithLoadStoreAction(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction)
Declaration
public static void SetRenderTargetWithLoadStoreAction(this CommandBuffer cmd, RenderTargetIdentifier color, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction, RenderTargetIdentifier depth, RenderBufferLoadAction depthLoadAction, RenderBufferStoreAction depthStoreAction)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RenderTargetIdentifier |
color |
|
RenderBufferLoadAction |
colorLoadAction |
|
RenderBufferStoreAction |
colorStoreAction |
|
RenderTargetIdentifier |
depth |
|
RenderBufferLoadAction |
depthLoadAction |
|
RenderBufferStoreAction |
depthStoreAction |
|