기술 자료

Unity Engine

Unity Engine

this[]

Access the x, y, z, w components using [0], [1], [2], [3] respectively.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

this[int]

public float this[int index] { get; set; }

Parameters

index

Returns

Type

Description

float

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { Quaternion p = new Quaternion(); p[3] = 0.5f; // the same as p.w = 0.5 }}