class in UnityEngine
/
Inherits from:Material
Class for ProceduralMaterial handling.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public string floatRangeProperty = "Saturation"; public float cycleTime = 10; public Renderer rend; void Start() { rend = GetComponent<Renderer>(); } void Update() { ProceduralMaterial substance = rend.sharedMaterial as ProceduralMaterial; if (substance) { float lerp = Mathf.PingPong(Time.time * 2 / cycleTime, 1); substance.SetProceduralFloat(floatRangeProperty, lerp); substance.RebuildTextures(); } } }
| color | Основной цвет материала. |
| doubleSidedGI | Gets and sets whether the Double Sided Global Illumination setting is enabled for this material. |
| enableInstancing | Gets and sets whether GPU instancing is enabled for this material. |
| globalIlluminationFlags | Defines how the material should interact with lightmaps and lightprobes. |
| mainTexture | Текстура материала. |
| mainTextureOffset | Отступ основной текстуры. |
| mainTextureScale | Масштабирование основной текстуры. |
| passCount | How many passes are in this material (Read Only). |
| renderQueue | Render queue of this material. |
| shader | The shader used by the material. |
| shaderKeywords | Additional shader keywords set by this material. |
| hideFlags | Should the object be hidden, saved with the scene or modifiable by the user? |
| name | The name of the object. |
| CopyPropertiesFromMaterial | Копирует свойства с другого материала в данный материал. |
| DisableKeyword | "Отзывает" ключевое слово шейдера. |
| EnableKeyword | Sets a shader keyword that is enabled by this material. |
| FindPass | Returns the index of the pass passName. |
| GetColor | Получает имя значения цвета. |
| GetColorArray | Get a named color array. |
| GetFloat | Получает именованное float значение. |
| GetFloatArray | Get a named float array. |
| GetInt | Получает именованное integer значение. |
| GetMatrix | Получает именованное значение матрицы из шейдера. |
| GetMatrixArray | Get a named matrix array. |
| GetPassName | Returns the name of the shader pass at index pass. |
| GetShaderPassEnabled | Checks whether a given Shader pass is enabled on this Material. |
| GetTag | Получает тэг шейдера материала. |
| GetTexture | Получает именованную текстуру. |
| GetTextureOffset | Получает размещение смещения текстуры propertyName. |
| GetTextureScale | Получает размещение масштабирования текстуры propertyName. |
| GetVector | Получает значение именованного вектора. |
| GetVectorArray | Get a named vector array. |
| HasProperty | Проверяет, имеет ли шейдер материала свойство по заданному имени. |
| IsKeywordEnabled | Устанавливает ключевое слово шейдера, которое активируется данным материалом. |
| Lerp | Интерполирует свойства между двумя материалами. |
| SetBuffer | Sets a named ComputeBuffer value. |
| SetColor | Sets a named color value. |
| SetColorArray | Sets a color array property. |
| SetFloat | Sets a named float value. |
| SetFloatArray | Sets a float array property. |
| SetInt | Sets a named integer value. |
| SetMatrix | Sets a named matrix for the shader. |
| SetMatrixArray | Sets a matrix array property. |
| SetOverrideTag | Устанавливает ключевое слово шейдера, которое активируется данным материалом. |
| SetPass | Активирует, учитывая pass для визуализации. |
| SetShaderPassEnabled | Enables or disables a Shader pass on a per-Material level. |
| SetTexture | Sets a named texture. |
| SetTextureOffset | Устанавливает перемещение отступа текстуры propertyName. |
| SetTextureScale | Устанавливает перемещение масштабирования текстуры propertyName. |
| SetVector | Sets a named vector value. |
| SetVectorArray | Sets a vector array property. |
| GetInstanceID | Returns the instance id of the object. |
| ToString | Returns the name of the GameObject. |
| Destroy | Удаляет GameObject, Component или Asset. |
| DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
| DontDestroyOnLoad | Makes the object target not be destroyed automatically when loading a new scene. |
| FindObjectOfType | Returns the first active loaded object of Type type. |
| FindObjectsOfType | Returns a list of all active loaded objects of Type type. |
| Instantiate | Clones the object original and returns the clone. |
| bool | Does the object exist? |
| operator != | Compares if two objects refer to a different object. |
| operator == | Compares two object references to see if they refer to the same object. |