Version: 2021.1
言語: 日本語

LineRenderer

class in UnityEngine

/

継承:Renderer

マニュアルに切り替える

説明

3D 空間にラインを描画するために使います。

このクラスは LineRenderer コンポーネントのスクリプトインターフェースです。

変数

alignmentSelect whether the line will face the camera, or the orientation of the Transform Component.
colorGradientSet the color gradient describing the color of the line at various points along its length.
endColorSet the color at the end of the line.
endWidthSet the width at the end of the line.
generateLightingDataConfigures a line to generate Normals and Tangents. With this data, Scene lighting can affect the line via Normal Maps and the Unity Standard Shader, or your own custom-built Shaders.
loopConnect the start and end positions of the line together to form a continuous loop.
numCapVerticesSet this to a value greater than 0, to get rounded corners on each end of the line.
numCornerVerticesSet this to a value greater than 0, to get rounded corners between each segment of the line.
positionCountSet/get the number of vertices.
shadowBiasApply a shadow bias to prevent self-shadowing artifacts. The specified value is the proportion of the line width at each segment.
startColorSet the color at the start of the line.
startWidthSet the width at the start of the line.
textureModeChoose whether the U coordinate of the line texture is tiled or stretched.
useWorldSpace有効の場合はワールド座標、無効の場合はローカル座標になります。
widthCurveSet the curve describing the width of the line at various points along its length.
widthMultiplierSet an overall multiplier that is applied to the LineRenderer.widthCurve to get the final width of the line.

Public 関数

BakeMeshCreates a snapshot of LineRenderer and stores it in mesh.
GetPositionGet the position of a vertex in the line.
GetPositionsGet the positions of all vertices in the line.
SetPositionSet the position of a vertex in the line.
SetPositionsラインのすべての頂点の位置を設定します。
SimplifyGenerates a simplified version of the original line by removing points that fall within the specified tolerance.

継承メンバー

変数

gameObjectこのコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。
tagゲームオブジェクトのタグ
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名
allowOcclusionWhenDynamicControls if dynamic occlusion culling should be performed for this renderer.
boundsレンダラーのバウンディングボリューム(読み取り専用)
enabled有効にした場合、レンダリングされた 3D オブジェクトが表示されます
forceRenderingOffAllows turning off rendering for a specific component.
isPartOfStaticBatchレンダラーが静的にバッチ処理されているか
isVisibleカメラにレンダラーが表示されているか(読み取り専用)
lightmapIndexこのレンダラーに適用されるベイクされるライトマップのインデックス
lightmapScaleOffsetUV スケールとオフセットをライトマップに使用します。
lightProbeProxyVolumeOverrideこれを設定すると、レンダラーはソースのゲームオブジェクトにアタッチされた ライトプローブプロキシボリューム コンポーネントを使用します。
lightProbeUsageライトプローブ補間のタイプ
localToWorldMatrixローカル座標からワールド座標へ変換した行列(読み取り専用)
materialレンダラーに割り当てられている最初にインスタンス化された Material を返します。
materialsこのオブジェクトのすべてのインスタンス化されたマテリアルを返します。
motionVectorGenerationModeSpecifies the mode for motion vector rendering.
probeAnchor設定する場合、レンダラーはライトプローブや反射プローブを見つけるためにこの Transform の位置を使用します。
rayTracingModeDescribes how this renderer is updated for ray tracing.
realtimeLightmapIndexこのレンダラーに適用されるリアルタイムライトマップのインデックス
realtimeLightmapScaleOffsetリアルタイムライトマップで使用される UV スケールとオフセット
receiveShadowsこのオブジェクトが影の影響を受けるかどうか
reflectionProbeUsage反射プローブはこのレンダラーのために使用する必要があるか。
rendererPriorityThis value sorts renderers by priority. Lower values are rendered first and higher values are rendered last.
renderingLayerMaskDetermines which rendering layer this renderer lives on.
shadowCastingModeこのオブジェクトが影をキャストするかどうか
sharedMaterialこのオブジェクトの共有マテリアル
sharedMaterialsこのオブジェクトのすべての共有マテリアル
sortingLayerIDレンダラーの Sorting Layer の Unique ID
sortingLayerNameレンダラーの Sorting Layer の名前
sortingOrderSorting Layer によるレンダラーのオーダー順
staticShadowCasterIs this renderer a static shadow caster?
worldToLocalMatrixワールド座標からローカル座標へ変換した行列(読み取り専用)

Public 関数

BroadcastMessageゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。
CompareTagこのゲームオブジェクトは tag とタグ付けされているかどうか
GetComponentReturns the component of Type type if the GameObject has one attached, null if it doesn't. Will also return disabled components.
GetComponentInChildren GameObject や深さ優先探索を活用して、親子関係にある子オブジェクトから type のタイプのコンポーネントを取得します。
GetComponentInParent GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを取得します。
GetComponents GameObject から type のタイプのコンポーネントを「すべて」取得します。
GetComponentsInChildrenReturns all components of Type type in the GameObject or any of its children. Works recursively.
GetComponentsInParent GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを「すべて」取得します。
SendMessageゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
SendMessageUpwardsゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
TryGetComponentGets the component of the specified type, if it exists.
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.
GetClosestReflectionProbes重みを持つ最も近い反射プローブの配列を返します。重みはプローブがレンダラーでどのくらい影響するかを示しています。反射プローブが発生する間のブレンドにもこの値が使用されます。
GetMaterialsこのオブジェクトのすべてのインスタンス化されたマテリアルを返します。
GetPropertyBlockGet per-Renderer or per-Material property block.
GetSharedMaterialsReturns all the shared materials of this object.
HasPropertyBlockReturns true if the Renderer has a material property block attached via SetPropertyBlock.
SetPropertyBlockLets you set or clear per-renderer or per-material parameter overrides.

Static 関数

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiateoriginal のオブジェクトをクローンします

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。

メッセージ

OnBecameInvisible"OnBecameInvisible" は任意のカメラでオブジェクトが表示されなくなるときに呼び出されます。
OnBecameVisible"OnBecameVisible" は任意のカメラでオブジェクトが見えるようになったときに呼び出されます。