SetWidth(float, float)
Set the line width at the start and at the end.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public void SetWidth(float start, float end)
Parameters
Remarks
Additional Resources: LineRenderer.startWidth, LineRenderer.endWidth or LineRenderer.widthCurve properties.
Examples
using UnityEngine;public class Example : MonoBehaviour{ // Adds a lineRenderer to this transform and // Converts the line Renderer into a triangle. void Start() { LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>(); lineRenderer.SetWidth(0, 3); }}