Version: 2022.3
言語: 日本語
public Vector2 center ;

説明

矩形の中心座標

using UnityEngine;

public class Example : MonoBehaviour { void Start() { Rect rect = new Rect(0, 0, 100, 100); print(rect.center); rect.center = new Vector2(10, 10); } }