Camera.pixelRect 像素矩形


var pixelRect : Rect

Description描述

Where on the screen is the camera rendered in pixel coordinates.

相机被渲染到屏幕像素中的位置。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {void Update() {Rect r = camera.pixelRect;print("Camera displays from " + r.xMin + " to " + r.xMax + " pixel");}}
function Update () {var r : Rect = camera.pixelRect;print ("Camera displays from " + r.xMin + " to " + r.xMax + " pixel");}


,