Skip to content

SpotLight ​

円錐状に届く照明を設定します。

使い方と前提条件 · C# API一覧

型の情報 ​

Color ​

csharp
public Color4 Color

色を指定します。RGBAではAlphaも持ちます。

操作:読取・変更。

対応するInspector:SpotLight。

CosAngle ​

csharp
public float CosAngle

SpotLightの外側半角の余弦値です。Inspectorの角度表示とAPIの値を区別します。

操作:読取・変更。

対応するInspector:SpotLight。

CosFalloffStart ​

csharp
public float CosFalloffStart

SpotLightの角度減衰が始まる半角の余弦値です。

操作:読取・変更。

対応するInspector:SpotLight。

Decay ​

csharp
public float Decay

距離に応じた減衰の強さです。

操作:読取・変更。

対応するInspector:SpotLight。

Direction ​

csharp
public Vector3 Direction

光などが進む方向です。長さより向きを指定します。

操作:読取・変更。

対応するInspector:SpotLight。

Distance ​

csharp
public float Distance

光が届く距離などの上限です。

操作:読取・変更。

対応するInspector:SpotLight。

Enabled ​

csharp
public bool Enabled

このComponentの処理を有効にします。GameObject全体のアクティブ状態とは別です。

操作:読取・変更。

対応するInspector:SpotLight。

FromEntity ​

csharp
public static SpotLight FromEntity(GameObject gameObject)

既にComponentを持つGameObjectから操作用の参照を作ります。Componentを追加する操作ではありません。

引数型既定値
gameObjectNEMEngine.GameObject必須

戻り値:NEMEngine.SpotLight。

Intensity ​

csharp
public float Intensity

光や効果の強度倍率です。

操作:読取・変更。

対応するInspector:SpotLight。

ShadowRadius ​

csharp
public float ShadowRadius

光源の半径です。影のぼけ方に影響します。

操作:読取・変更。

対応するInspector:SpotLight。

ShadowStrength ​

csharp
public float ShadowStrength

影による減光の強さです。0で影の影響がなくなります。

操作:読取・変更。

対応するInspector:SpotLight。

componentTypeID ​

csharp
public static int componentTypeID

組み込みComponentの接続識別子です。通常のゲームコードではGetComponentで取得します。

操作:読取専用。

実行時の扱い ​

Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。

現行版マニュアル · 8ea58ba2 · 2026-10-28確認