表示テーマ
DecalProjector
箱の範囲内の表面へ色・法線・質感・発光を投影します。傷や汚れに使います。
型の情報
- 名前空間:
NEMEngine - 型:
NEMEngine.DecalProjector(Class) - 継承元:NEMEngine.Component
- Inspector:DecalProjector
FromEntity
csharp
public static DecalProjector FromEntity(GameObject gameObject)既にComponentを持つGameObjectから操作用の参照を作ります。Componentを追加する操作ではありません。
| 引数 | 型 | 既定値 |
|---|---|---|
gameObject | NEMEngine.GameObject | 必須 |
戻り値:NEMEngine.DecalProjector。
MaterialInstance
csharp
public MaterialInstance MaterialInstanceこのRendererだけに適用するMaterial Parameterです。共有Materialの変更とは区別します。
操作:読取専用。
color
csharp
public Color4 color色を指定します。RGBAではAlphaも持ちます。
操作:読取・変更。
対応するInspector:DecalProjector。
componentTypeID
csharp
public static int componentTypeID組み込みComponentの接続識別子です。通常のゲームコードではGetComponentで取得します。
操作:読取専用。
drawDistance
csharp
public float drawDistance描画する距離の上限です。
操作:読取・変更。
対応するInspector:DecalProjector。
enabled
csharp
public bool enabledこのComponentの処理を有効にします。GameObject全体のアクティブ状態とは別です。
操作:読取・変更。
対応するInspector:DecalProjector。
endAngleFade
csharp
public float endAngleFade角度フェードで完全に消える角度です。単位は度です。
操作:読取・変更。
対応するInspector:DecalProjector。
fadeFactor
csharp
public float fadeFactorDecalの不透明度倍率です。0で透明、1で元の不透明度です。
操作:読取・変更。
対応するInspector:DecalProjector。
fadeScale
csharp
public float fadeScale描画距離に対してフェードを始める比率です。
操作:読取・変更。
対応するInspector:DecalProjector。
material
csharp
public Material? material描画に使うMaterial参照です。既定MaterialはEngine側から解決されます。
操作:読取・変更。
対応するInspector:DecalProjector。
pivot
csharp
public Vector3 pivot形状の原点または投影中心をずらします。
操作:読取・変更。
対応するInspector:DecalProjector。
receiverRenderingLayerMask
csharp
public uint receiverRenderingLayerMaskDecalを受け付けるRendererの描画Layerを選びます。
操作:読取・変更。
対応するInspector:DecalProjector。
renderingLayerMask
csharp
public uint renderingLayerMaskこのRendererを表示するCameraのCullingMaskと照合するbit集合です。
操作:読取・変更。
対応するInspector:DecalProjector。
size
csharp
public Vector3 size形状の幅・高さ・奥行きです。TransformのScaleも掛かります。
操作:読取・変更。
対応するInspector:DecalProjector。
sortOrder
csharp
public int sortOrderDecalの重なり順です。
操作:読取・変更。
対応するInspector:DecalProjector。
startAngleFade
csharp
public float startAngleFade受け取り面の角度によるフェード開始角です。単位は度です。
操作:読取・変更。
対応するInspector:DecalProjector。
uvBias
csharp
public Vector2 uvBiasUVへ加える移動量です。
操作:読取・変更。
対応するInspector:DecalProjector。
uvRotation
csharp
public float uvRotationUVの回転角です。APIの値はラジアンです。
操作:読取・変更。
対応するInspector:DecalProjector。
uvScale
csharp
public Vector2 uvScaleUVへ掛ける拡縮倍率です。
操作:読取・変更。
対応するInspector:DecalProjector。
実行時の扱い
Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。