|
Iuvo Unity 0.5.1
This is library containing a variety of helper classes and extension methods for the Unity gane engine. GitHub | Iuvo Unity Updates | Creator |
Provides extension methods for working with Unity Materials. More...
Static Public Member Functions | |
| static void | WithMainColor (this Material material, Color color) |
| Sets the main color of the material, if the "_Color" property exists. | |
| static void | WithMainTexture (this Material material, Texture texture) |
| Sets the main texture of the material, if the "_MainTex" property exists. | |
| static void | WithMainTextureOffset (this Material material, Vector2 offset) |
| Sets the offset of the main texture, if the "_MainTex" property exists. | |
| static void | WithMainTextureScale (this Material material, Vector2 scale) |
| Sets the scale of the main texture, if the "_MainTex" property exists. | |
| static void | WithMainTextureTiling (this Material material, Vector2 tiling) |
| Sets the tiling (scale) of the main texture. | |
| static void | WithMetallic (this Material material, float metallic) |
| Sets the metallic value of the material, clamped between 0 and 1. | |
| static void | WithEmissionColor (this Material material, Color color) |
| Sets the emission color of the material, if the "_EmissionColor" property exists. | |
| static void | WithShader (this Material material, Shader shader) |
| Sets the shader of the material. | |
| static void | WithShader (this Material material, string shaderName) |
| static void | WithShader (this Material material, string shaderName, string fallbackShaderName) |
| Sets the shader of the material by name, falling back to a secondary shader if the first is not found. | |
| static void | WithRenderingMode (this Material material, int mode) |
| Sets the rendering mode of the material using the "_Mode" property. | |
| static void | WithBuffer (this Material material, string propertyName, ComputeBuffer buffer) |
| Sets a compute buffer on the material. | |
| static void | WithColorArray (this Material material, string propertyName, Color[] colors) |
| Sets a color array on the material. | |
| static void | WithFloatArray (this Material material, string propertyName, float[] values) |
| Sets a float array on the material. | |
| static void | WithMatrixArray (this Material material, string propertyName, Matrix4x4[] matrices) |
| Sets a matrix array on the material. | |
| static void | WithTextureArray (this Material material, string propertyName, Texture2DArray textures) |
| Sets a texture array (Texture2DArray) on the material. | |
| static void | WithVectorArray (this Material material, string propertyName, Vector4[] vectors) |
| Sets a vector array on the material. | |
Provides extension methods for working with Unity Materials.
|
static |
Sets a compute buffer on the material.
| material | The material to modify. |
| propertyName | The shader property name. |
| buffer | The compute buffer. |
References IuvoUnity.Debug.IuvoDebug.DebugLogWarning().
|
static |
Sets a color array on the material.
| material | The material to modify. |
| propertyName | The shader property name. |
| colors | The array of colors. |
|
static |
Sets the emission color of the material, if the "_EmissionColor" property exists.
| material | The material to modify. |
| color | The emission color. |
|
static |
Sets a float array on the material.
| material | The material to modify. |
| propertyName | The shader property name. |
| values | The array of float values. |
|
static |
Sets the main color of the material, if the "_Color" property exists.
| material | The material to modify. |
| color | The color to apply. |
References IuvoUnity.Debug.IuvoDebug.DebugLogWarning().
|
static |
Sets the main texture of the material, if the "_MainTex" property exists.
| material | The material to modify. |
| texture | The texture to assign. |
References IuvoUnity.Debug.IuvoDebug.DebugLogWarning().
|
static |
Sets the offset of the main texture, if the "_MainTex" property exists.
| material | The material to modify. |
| offset | The texture offset. |
|
static |
Sets the scale of the main texture, if the "_MainTex" property exists.
| material | The material to modify. |
| scale | The texture scale. |
|
static |
Sets the tiling (scale) of the main texture.
| material | The material to modify. |
| tiling | The tiling vector. |
|
static |
Sets a matrix array on the material.
| material | The material to modify. |
| propertyName | The shader property name. |
| matrices | The array of matrices. |
|
static |
Sets the metallic value of the material, clamped between 0 and 1.
| material | The material to modify. |
| metallic | The metallic value. |
|
static |
Sets the rendering mode of the material using the "_Mode" property.
| material | The material to modify. |
| mode | The rendering mode (typically 0=Opaque, 1=Cutout, 2=Fade, 3=Transparent). |
References IuvoUnity.Debug.IuvoDebug.DebugLogWarning().
|
static |
Sets the shader of the material.
| material | The material to modify. |
| shader | The shader to assign. |
References IuvoUnity.Debug.IuvoDebug.DebugLogWarning().
|
static |
<summary Sets the shader of the material by shader name.
| material | The material to modify. |
| shaderName | The name of the shader. |
References IuvoUnity.Debug.IuvoDebug.DebugLogWarning().
|
static |
Sets the shader of the material by name, falling back to a secondary shader if the first is not found.
| material | The material to modify. |
| shaderName | The primary shader name. |
| fallbackShaderName | The fallback shader name. |
References IuvoUnity.Debug.IuvoDebug.DebugLogError(), and IuvoUnity.Debug.IuvoDebug.DebugLogWarning().
|
static |
Sets a texture array (Texture2DArray) on the material.
| material | The material to modify. |
| propertyName | The shader property name. |
| textures | The texture array to assign. |
References IuvoUnity.Debug.IuvoDebug.DebugLogWarning().
|
static |
Sets a vector array on the material.
| material | The material to modify. |
| propertyName | The shader property name. |
| vectors | The array of vectors. |