ドキュメント

Unity Engine

Unity Engine

this[]

Access the x, y, z components using [0], [1], [2] respectively.
読み終わるまでの所要時間 1 分最終更新 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;using System.Collections;public class ExampleClass : MonoBehaviour{ public Vector3 p; void Example() { // set p.y as 5.0f p[1] = 5.0f; }}