ProceduralMaterial を処理するクラス
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(); } } }
| isSupported | 今のプラットフォームでサポートされているかを確認します |
| substanceProcessorUsage | CPU の使用率を指定するために使用します |
| animationUpdateRate | アニメーションの更新レートを設定/取得します |
| cacheSize | キャッシュバジェットを設定/取得します |
| isCachedDataAvailable | キャッシュされたデータがこの ProceduralMaterial のテクスチャ (キャッシュと DoNothingAndCache に関連する読み込み動作のみ)で利用できるかどうかを示します |
| isFrozen | FreezeAndReleaseSourceData がこの ProceduralMaterial で呼び出される場合、 True を返します |
| isLoadTimeGenerated | 読み込み時に生成されるべきかを判断します |
| isProcessing | テクスチャの再レンダリング中に、Procedural<aterial オブジェクト |
| isReadable | ProceduralMaterial の "Readable" フラグを設定、取得します |
| loadingBehavior | ProceduralMaterial の読み込み動作を取得します |
| preset | "入力と値" の組の XML 文字列を取得、設定します(プリセットを設定して、テクスチャをリビルドします) |
| CacheProceduralProperty | 指定した名前のプロパティーをキャッシュするかを設定します |
| ClearCache | プロシージャルキャッシュをクリアします |
| FreezeAndReleaseSourceData | ProceduralMaterial を Immutable でレンダリングし、メモリの使用容量を減らすために基になるデータをリリースします。 |
| GetGeneratedTexture | ProceduralMaterial により生成された ProceduralTexture への参照を、ProceduralTexture の名前を使用して取得できます |
| GetGeneratedTextures | 生成されたテクスチャを取得します |
| GetProceduralBoolean | プロパティー名を指定して Boolean 型のプロパティーを取得します |
| GetProceduralColor | プロパティー名を指定して Color 型のプロパティーを取得します |
| GetProceduralEnum | プロパティー名を指定して Enum 型のプロパティーを取得します |
| GetProceduralFloat | プロパティー名を指定して Float 型のプロパティーを取得します |
| GetProceduralPropertyDescriptions | この ProceduralMaterial が持っているすべての ProceduralProperties の記述の配列を取得します。 |
| GetProceduralTexture | プロパティー名を指定して Texture2D 型のプロパティーを取得します |
| GetProceduralVector | プロパティー名を指定して Vector 型のプロパティーを取得します |
| HasProceduralProperty | 指定した名前の ProceduralProperty があるか確認します |
| IsProceduralPropertyCached | 指定した名前のプロパティーがキャッシュされているかを確認します |
| IsProceduralPropertyVisible | 指定された ProceduralProperty がこの ProceduralMaterial の他の ProceduralProperties の値と ProceduralProperty の visibleIf 条件式にしたがって表示される場合、チェックします |
| RebuildTextures | この ProceduralMaterial の古いテクスチャを非同期のリビルドをトリガーします |
| RebuildTexturesImmediately | この ProceduralMaterial の古いテクスチャを即時(同期) にリビルドをトリガーします |
| SetProceduralBoolean | プロパティー名を指定して Boolean 型のプロパティーを設定します |
| SetProceduralColor | プロパティー名を指定して Color 型のプロパティーを設定します |
| SetProceduralEnum | プロパティー名を指定して Enum 型のプロパティーを設定します |
| SetProceduralFloat | プロパティー名を指定して Float 型のプロパティーを設定します |
| SetProceduralTexture | プロパティー名を指定して Texture2D 型のプロパティーを設定します |
| SetProceduralVector | プロパティー名を指定して Vector 型のプロパティーを設定します |
| StopRebuilds | まだ開始していないキューに置かれた ProceduralMaterial のレンダリング操作をすべて破棄します |
| 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 | マテリアルがライトマップとライトプローブをどのように操作するかを定義します |
| mainTexture | マテリアルのテクスチャ |
| mainTextureOffset | メインテクスチャのオフセット |
| mainTextureScale | メインテクスチャのスケール |
| passCount | マテリアルのパスの数(読み取り専用) |
| renderQueue | マテリアルのレンダーキュー |
| shader | マテリアルで使用するシェーダー |
| shaderKeywords | マテリアルに設定される追加シェーダーキーワード |
| hideFlags | オブジェクトは非表示、シーンに保存、ユーザーが編集可能、などを設定する。 |
| name | オブジェクト名 |
| 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 | 設定された名前から int 値を取得します |
| GetMatrix | 設定された名前から matrix 値を取得します |
| 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 | テクスチャのプロパティー名から画像のオフセットを取得します |
| GetTextureScale | テクスチャのプロパティー名から画像の大きさを取得します |
| GetVector | プロパティー名から Vector4 型の値を取得します |
| GetVectorArray | Get a named vector array. |
| HasProperty | シェーダーのプロパティーに特定のプロパティー名が設定されているか確認します |
| IsKeywordEnabled | マテリアル上でシェーダーキーワードが有効になっているかどうか |
| Lerp | 2 つのマテリアルを時間をかけて変更させます |
| 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 | マテリアルの Tag/Value を上書きに設定します |
| SetPass | レンダリングのための特定のパスを有効にします |
| SetShaderPassEnabled | Enables or disables a Shader pass on a per-Material level. |
| SetTexture | Sets a named texture. |
| SetTextureOffset | テクスチャのオフセットを設定します |
| SetTextureScale | テクスチャのスケールを設定します |
| SetVector | Sets a named vector value. |
| SetVectorArray | Sets a vector array property. |
| GetInstanceID | オブジェクトのインスタンス ID を返します |
| ToString | ゲームオブジェクトの名前を返します |
| Destroy | ゲームオブジェクトやコンポーネント、アセットを削除します |
| DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
| DontDestroyOnLoad | 新しいシーンを読み込んでもオブジェクトが自動で破壊されないように設定します |
| FindObjectOfType | タイプ type から最初に見つけたアクティブのオブジェクトを返します |
| FindObjectsOfType | タイプから見つけたすべてのアクティブのオブジェクト配列を返します |
| Instantiate | original のオブジェクトをクローンします |
| bool | オブジェクトが存在するかどうか |
| operator != | 二つのオブジェクトが異なるオブジェクトを参照しているか比較します |
| operator == | 2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。 |