表示テーマ
PrimitiveRenderer
Plane、Ring、Sphere、Cylinderなどの形状をモデルAssetなしで描画します。
型の情報
- 名前空間:
NEMEngine - 型:
NEMEngine.PrimitiveRenderer(Class) - 継承元:NEMEngine.Component
- Inspector:PrimitiveRenderer
BlendMode
csharp
public BlendMode BlendMode背景への色の混ぜ方です。加算などの方式を選びます。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
CrossPlane
csharp
public PrimitiveRenderer.CrossPlaneAccessor CrossPlane交差する板の枚数・寸法などの設定です。
操作:読取専用。
Cube
csharp
public PrimitiveRenderer.CubeAccessor CubeCubeの寸法・原点設定です。
操作:読取専用。
Cylinder
csharp
public PrimitiveRenderer.CylinderAccessor CylinderCylinderの半径・高さ・分割数・頂点色の設定です。
操作:読取専用。
FromEntity
csharp
public static PrimitiveRenderer FromEntity(GameObject gameObject)既にComponentを持つGameObjectから操作用の参照を作ります。Componentを追加する操作ではありません。
| 引数 | 型 | 既定値 |
|---|---|---|
gameObject | NEMEngine.GameObject | 必須 |
戻り値:NEMEngine.PrimitiveRenderer。
GetColor
csharp
public Color4 GetColor()現在のマテリアル color を取得する。
戻り値:NEMEngine.Color4。
Hemisphere
csharp
public PrimitiveRenderer.HemisphereAccessor Hemisphere半球の半径・分割数・底面の設定です。
操作:読取専用。
Layer
csharp
public int Layer描画するLayer番号です。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
Material
csharp
public Material? Material描画に使うMaterial参照です。既定MaterialはEngine側から解決されます。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
MaterialInstance
csharp
public MaterialInstance MaterialInstanceこのRendererだけに適用するMaterial Parameterです。共有Materialの変更とは区別します。
操作:読取専用。
Order
csharp
public int Order同じLayer内の並び順です。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
Plane
csharp
public PrimitiveRenderer.PlaneAccessor Plane無限平面との衝突を有効にします。
操作:読取専用。
Queue
csharp
public RenderPhase Queue同じ描画区分内の並び順です。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
RenderFlags
csharp
public MeshRenderFlags RenderFlags照明・影・IBL・反射などを受けるかのbit設定です。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
RenderSpace
csharp
public PrimitiveRenderSpace RenderSpaceWorld3DとScreen2Dの描画空間を選びます。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
RenderingLayerMask
csharp
public uint RenderingLayerMaskこのRendererを表示するCameraのCullingMaskと照合するbit集合です。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
Ring
csharp
public PrimitiveRenderer.RingAccessor RingRingの内外半径・角度・分割数の設定です。
操作:読取専用。
SetColor
csharp
public void SetColor(Color3 color)色Parameterを設定します。
| 引数 | 型 | 既定値 |
|---|---|---|
color | NEMEngine.Color3 | 必須 |
SetColor
csharp
public void SetColor(Color4 color)マテリアル color を上書きする。
| 引数 | 型 | 既定値 |
|---|---|---|
color | NEMEngine.Color4 | 必須 |
Sphere
csharp
public PrimitiveRenderer.SphereAccessor SphereSphere形状の半径と分割数などの設定です。
操作:読取専用。
Type
csharp
public PrimitiveType Type形状または動作の種類です。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
Visible
csharp
public bool Visible通常描画に表示するかを指定します。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
componentTypeID
csharp
public static int componentTypeID組み込みComponentの接続識別子です。通常のゲームコードではGetComponentで取得します。
操作:読取専用。
receiveDecals
csharp
public bool receiveDecalsDecalの投影を受け付けます。
操作:読取・変更。
対応するInspector:PrimitiveRenderer。
実行時の扱い
Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。