3D 空間にラインを描画するために使います。
このクラスは LineRenderer コンポーネントのスクリプトインターフェースです。
alignment | Select whether the line will face the camera, or the orientation of the Transform Component. |
colorGradient | Set the color gradient describing the color of the line at various points along its length. |
endColor | Set the color at the end of the line. |
endWidth | Set the width at the end of the line. |
generateLightingData | Configures 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. |
loop | Connect the start and end positions of the line together to form a continuous loop. |
maskInteraction | Specifies how the LineRenderer interacts with SpriteMask. |
numCapVertices | Set this to a value greater than 0, to get rounded corners on each end of the line. The default is 0. |
numCornerVertices | Set this to a value greater than 0, to get rounded corners between each segment of the line. |
positionCount | Set/get the number of vertices. |
shadowBias | Apply a shadow bias to prevent self-shadowing artifacts. The specified value is the proportion of the line width at each segment. |
startColor | Set the color at the start of the line. |
startWidth | Set the width at the start of the line. |
textureMode | Choose whether the U coordinate of the line texture is tiled or stretched. |
textureScale | A multiplier for the UV coordinates of the line texture. |
useWorldSpace | 有効の場合はワールド座標、無効の場合はローカル座標になります。 |
widthCurve | Set the curve describing the width of the line at various points along its length. |
widthMultiplier | Set an overall multiplier that is applied to the LineRenderer.widthCurve to get the final width of the line. |
BakeMesh | Creates a snapshot of LineRenderer and stores it in mesh. |
GetPosition | Get the position of a vertex in the line. |
GetPositions | Get the positions of all vertices in the line. |
SetPosition | Set the position of a vertex in the line. |
SetPositions | ラインのすべての頂点の位置を設定します。 |
Simplify | Generates a simplified version of the original line by removing points that fall within the specified tolerance. |
gameObject | このコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。 |
tag | ゲームオブジェクトのタグ |
transform | The Transform attached to this GameObject. |
hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
name | オブジェクト名 |
allowOcclusionWhenDynamic | Controls if dynamic occlusion culling should be performed for this renderer. |
bounds | The bounding box of the renderer in world space. |
enabled | 有効にした場合、レンダリングされた 3D オブジェクトが表示されます |
forceRenderingOff | Allows turning off rendering for a specific component. |
isPartOfStaticBatch | Indicates whether the renderer is part of a static batch with other renderers. |
isVisible | カメラにレンダラーが表示されているか(読み取り専用) |
lightmapIndex | このレンダラーに適用されるベイクされるライトマップのインデックス |
lightmapScaleOffset | UV スケールとオフセットをライトマップに使用します。 |
lightProbeProxyVolumeOverride | これを設定すると、レンダラーはソースのゲームオブジェクトにアタッチされた **ライトプローブプロキシボリューム** コンポーネントを使用します。 |
lightProbeUsage | ライトプローブ補間のタイプ |
localBounds | The bounding box of the renderer in local space. |
localToWorldMatrix | ローカル座標からワールド座標へ変換した行列(読み取り専用) |
material | レンダラーに割り当てられている最初にインスタンス化された Material を返します。 |
materials | このオブジェクトのすべてのインスタンス化されたマテリアルを返します。 |
motionVectorGenerationMode | Specifies the mode for motion vector rendering. |
probeAnchor | 設定する場合、レンダラーはライトプローブや反射プローブを見つけるためにこの Transform の位置を使用します。 |
rayTracingMode | Describes how this renderer is updated for ray tracing. |
realtimeLightmapIndex | The index of the real-time lightmap applied to this renderer. |
realtimeLightmapScaleOffset | The UV scale & offset used for a real-time lightmap. |
receiveShadows | このオブジェクトが影の影響を受けるかどうか |
reflectionProbeUsage | 反射プローブはこのレンダラーのために使用する必要があるか。 |
rendererPriority | This value sorts renderers by priority. Lower values are rendered first and higher values are rendered last. |
renderingLayerMask | Determines which rendering layer this renderer lives on. |
shadowCastingMode | このオブジェクトが影をキャストするかどうか |
sharedMaterial | このオブジェクトの共有マテリアル |
sharedMaterials | このオブジェクトのすべての共有マテリアル |
sortingLayerID | レンダラーの Sorting Layer の Unique ID |
sortingLayerName | レンダラーの Sorting Layer の名前 |
sortingOrder | Sorting Layer によるレンダラーのオーダー順 |
staticShadowCaster | Is this renderer a static shadow caster? |
worldToLocalMatrix | ワールド座標からローカル座標へ変換した行列(読み取り専用) |
BroadcastMessage | ゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。 |
CompareTag | Checks the GameObject's tag against the defined tag. |
GetComponent | Gets a reference to a component of type T on the same GameObject as the component specified. |
GetComponentInChildren | Gets a reference to a component of type T on the same GameObject as the component specified, or any child of the GameObject. |
GetComponentInParent | Gets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject. |
GetComponents | Gets references to all components of type T on the same GameObject as the component specified. |
GetComponentsInChildren | Gets references to all components of type T on the same GameObject as the component specified, and any child of the GameObject. |
GetComponentsInParent | Gets references to all components of type T on the same GameObject as the component specified, and any parent of the GameObject. |
SendMessage | ゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します |
SendMessageUpwards | ゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します |
TryGetComponent | Gets the component of the specified type, if it exists. |
GetInstanceID | Gets the instance ID of the object. |
ToString | Returns the name of the object. |
GetClosestReflectionProbes | 重みを持つ最も近い反射プローブの配列を返します。重みはプローブがレンダラーでどのくらい影響するかを示しています。反射プローブが発生する間のブレンドにもこの値が使用されます。 |
GetMaterials | このオブジェクトのすべてのインスタンス化されたマテリアルを返します。 |
GetPropertyBlock | Get per-Renderer or per-Material property block. |
GetSharedMaterials | Returns all the shared materials of this object. |
HasPropertyBlock | Returns true if the Renderer has a material property block attached via SetPropertyBlock. |
ResetBounds | Reset custom world space bounds. |
ResetLocalBounds | Reset custom local space bounds. |
SetMaterials | Assigns the shared materials of this object using the list of materials provided. |
SetPropertyBlock | Lets you set or clear per-renderer or per-material parameter overrides. |
SetSharedMaterials | Assigns the shared materials of this object using the list of materials provided. |
Destroy | Removes a GameObject, component or asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Do not destroy the target Object when loading a new Scene. |
FindAnyObjectByType | Retrieves any active loaded object of Type type. |
FindFirstObjectByType | Retrieves the first active loaded object of Type type. |
FindObjectOfType | タイプ type から最初に見つけたアクティブのオブジェクトを返します |
FindObjectsByType | Retrieves a list of all loaded objects of Type type. |
FindObjectsOfType | Gets a list of all loaded objects of Type type. |
Instantiate | original のオブジェクトをクローンします |
bool | オブジェクトが存在するかどうか |
operator != | 二つのオブジェクトが異なるオブジェクトを参照しているか比較します |
operator == | 2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。 |
OnBecameInvisible | OnBecameInvisible is called when the object is no longer visible by any camera. |
OnBecameVisible | OnBecameVisible is called when the object became visible by any camera. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.