기술 자료

Unity Engine

Unity Engine

SetWidth(float, float)

Set the line width at the start and at the end.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
경고
Deprecated. Use startWidth, endWidth or widthCurve instead.
public void SetWidth(float start, float end)

Parameters

start

The width at the start of the line.

The width at the end of the line.

Remarks

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); }}