Version: 2017.1

Camera

class in UnityEngine

/

継承:Behaviour

マニュアルに切り替える

説明

カメラは、プレーヤーがそれを通して世界を見るためのデバイスです。

A screen space point is defined in pixels. The bottom-left of the screen is (0,0); the right-top is (pixelWidth,pixelHeight). The z position is in world units from the Camera.

A viewport space point is normalized and relative to the Camera. The bottom-left of the Camera is (0,0); the top-right is (1,1). The z position is in world units from the Camera.

ワールド空間ポイントはグローバル座標(例: Transform.position)で定義されています。

関連項目: camera component.

Static 変数

allCamerasシーン内の有効なすべてのカメラを返します。
allCamerasCount現在のシーンのカメラ数。
current現在レンダリングに使用している、低レベルレンダリングを管理するカメラ(読み取り専用)。
main"MainCamera" にタグ付けされている最初の有効なカメラ(読み取り専用)。
onPostRenderカメラがレンダリングを終えた後に発生するイベント
onPreCullカメラがカリングを開始する前に発生するイベント
onPreRenderカメラがレンダリングを開始する前に発生するイベント

変数

activeTextureGets the temporary RenderTexture target for this Camera.
actualRenderingPath現在使われているレンダリングパス(読み取り専用)。
allowHDRハイダイナミックレンジレンダリング。
allowMSAAMSAA rendering.
areVRStereoViewMatricesWithinSingleCullToleranceDetermines whether the stereo view matrices are suitable to allow for a single pass cull.
aspectアスペクト比(幅を高さで割った値)。
backgroundColor画面に何もないときに表示される色。
cameraToWorldMatrixカメラ空間からワールド空間に変換する行列(読み取り専用)。
cameraTypeカメラの種類を確認します。
clearFlagsカメラがどのように背景を取り除くか。
clearStencilAfterLightingPassカメラが Deferred Light Path の後にステンシルバッファをクリーンにする必要があるかどうか
commandBufferCountコマンドバッファ数をこのカメラに設定します(読取り専用)。
cullingMaskこれはシーンの一部を選択的に描画するのに使用されます。
cullingMatrixすべてのカリングクエリに使うためのカメラのカスタムマトリクスを設定します。
depthカメラのレンダリング順序という意味のカメラ深度。
depthTextureModeどのようにカメラがテクスチャを生成するか。まず生成するのか。
eventMaskカメラのイベントを発動できるレイヤーを選択するためのマスク。
farClipPlaneカメラに映る遠さを表す平面の距離。
fieldOfView度単位でのカメラの視野。
forceIntoRenderTextureShould camera rendering be forced into a RenderTexture.
layerCullDistancesレイヤー単位のカリング距離。
layerCullSphericalカメラに対してレイヤー単位のカリングをどのように実行するか。
nearClipPlaneカメラに映る近さを表す平面の距離。
nonJitteredProjectionMatrixカメラオフセットのない (小刻みな振動がない) Raw のプロジェクション行列を取得/設定します。
opaqueSortModeオブジェクトを不透明にするソーティングモード
orthographicカメラが orthographic か ( true )、perspective か ( false )。
orthographicSizeorthographic モードの場合、カメラの半分のサイズ。
pixelHeightカメラがピクセル単位でどれだけ高いか(読み取り専用)。
pixelRect画面上のピクセル座標でどこにカメラが描画されるか。
pixelWidthカメラがピクセル単位でどれだけ幅が広いか(読み取り専用)。
projectionMatrixカスタム射影行列を設定します。
rect画面座標の正規化座標でどこにカメラが描画されるか。
renderingPath可能な場合、レンダリングパスが使用されます。
sceneIf not null, the camera will only render the contents of the specified scene.
stereoActiveEyeReturns the eye that is currently rendering. If called when stereo is not enabled it will return Camera.MonoOrStereoscopicEye.Mono. If called during a camera rendering callback such as OnRenderImage it will return the currently rendering eye. If called outside of a rendering callback and stereo is enabled, it will return the default eye which is Camera.MonoOrStereoscopicEye.Left.
stereoConvergence仮想の目が収束する点までの距離。
stereoEnabled立体レンダリング。
stereoSeparationThe distance between the virtual eyes. Use this to query or set the current eye separation. Note that most VR devices provide this value, in which case setting the value will have no effect.
stereoTargetEyeVR ディスプレイのどちらの目にカメラがレンダリングするかを決定します。
targetDisplayこのカメラのターゲット表示を設定します。
targetTexture移動先のレンダーテクスチャ
transparencySortAxisAn axis that describes the direction along which the distances of objects are measured for the purpose of sorting.
transparencySortModeソートモードの透明オブジェクト。
useJitteredProjectionMatrixForTransparentRenderingShould the jittered matrix be used for transparency rendering?
useOcclusionCullingカメラがレンダリング中にオクルージョンカリングを使用するかどうか。
velocityカメラのワールド空間での速度を取得します(読み取り専用)。
worldToCameraMatrixワールド空間からカメラ空間に変換する行列。

Public 関数

AddCommandBuffer指定された場所で実行されるようコマンドバッファを追加します。
CalculateFrustumCornersGiven viewport coordinates, calculates the view space vectors pointing to the four frustum corners at the specified camera depth.
CalculateObliqueMatrix計算し、斜めの近平面射影行列を返します。
CopyFromこのカメラの設定を他のカメラと同じようにします。
GetCommandBuffers指定された場所で実行されるようにコマンドバッファを取得します。
GetStereoProjectionMatrixGets the projection matrix of a specific left or right stereoscopic eye.
GetStereoViewMatrixGets the left or right view matrix of a specific stereoscopic eye.
RemoveAllCommandBuffersこのカメラに設定されるすべてのコマンドバッファを削除します。
RemoveCommandBuffer指定された場所で実行からコマンドバッファを削除します。
RemoveCommandBuffers指定された場所で実行からコマンドバッファを削除してください。
Render手動でカメラをレンダリングします。
RenderToCubemapこのカメラから静的のキューブマップにレンダリングします。
RenderWithShaderシェーダーを交換してカメラをレンダリングします。
ResetAspectアスペクト比をスクリーンのアスペクト比に戻します。
ResetCullingMatrix通常状態のカメラのパラメーターをプロジェクションに反映させます。
ResetProjectionMatrix通常状態のカメラのパラメーターをプロジェクションに反映させます。
ResetReplacementShaderカメラで変更されたシェーダーを削除します。
ResetStereoProjectionMatricesReset the camera to using the Unity computed projection matrices for all stereoscopic eyes.
ResetStereoViewMatricesReset the camera to using the Unity computed view matrices for all stereoscopic eyes.
ResetTransparencySortSettingsResets this Camera's transparency sort settings to the default. Default transparency settings are taken from GraphicsSettings instead of directly from this Camera.
ResetWorldToCameraMatrixシーン内のカメラの位置をレンダリング位置として反映させます。
ScreenPointToRayスクリーンの点を通してカメラからカメラからレイを通します。
ScreenToViewportPointTransform position のスクリーン座標からビューポート座標に変換します。
ScreenToWorldPointTransform position のスクリーン座標からワールド座標に変換します。
SetReplacementShaderシェーダーの置換に対するカメラのレンダーを作成します。
SetStereoProjectionMatrixSets a custom projection matrix for a specific stereoscopic eye.
SetStereoViewMatrixSets a custom view matrix for a specific stereoscopic eye.
SetTargetBuffers1 つや複数の RenderTexture のバッファを選択されたカメラのレンダーに設定します。
ViewportPointToRayビューポート座標を介して、カメラからレイを飛ばします。
ViewportToScreenPointビューポート空間の position をスクリーン空間に変換します。
ViewportToWorldPointビューポート空間の position をワールド空間に変換します。
WorldToScreenPointワールド空間の position をスクリーン空間に変換します。
WorldToViewportPointワールド空間の position をビューポート空間に変換します。

Static 関数

GetAllCameras新規配列を割り当てることなく、シーン内のすべてのカメラを取得します。

メッセージ

OnPostRenderOnPostRender はカメラがシーンのレンダリングを終了した際に呼び出されます。
OnPreCullOnPreCull はカメラがシーンのカリングを行う直前に呼び出されます。
OnPreRenderOnPreRender はカメラがシーンのレンダリングを開始する前に呼び出されます。
OnRenderImageOnRenderImage はすべてのレンダリングが RenderImage へと完了したときに呼び出されます。
OnRenderObjectOnRenderObject はカメラがシーンをレンダリングした後に呼び出されます。
OnWillRenderObjectOnWillRenderObject はカメラからオブジェクトが可視状態の場合、各カメラごとに一回呼び出されます。

デリゲート

CameraCallbackカメラのコールバックで使用するデリゲート

継承メンバー

変数

enabled有効であれば更新され、無効であれば更新されません。
isActiveAndEnabledBehaviour が有効かどうか
gameObjectこのコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。
tagゲームオブジェクトのタグ
transformThe Transform attached to this GameObject.
hideFlagsオブジェクトは非表示、シーンに保存、ユーザーが編集可能、などを設定する。
nameオブジェクト名

Public 関数

BroadcastMessageゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。
CompareTagこのゲームオブジェクトは tag とタグ付けされているかどうか
GetComponentゲームオブジェクトに type がアタッチされている場合は type のタイプを使用してコンポーネントを返します。ない場合は null です
GetComponentInChildren GameObject や深さ優先探索を活用して、親子関係にある子オブジェクトから type のタイプのコンポーネントを取得します。
GetComponentInParent GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを取得します。
GetComponents GameObject から type のタイプのコンポーネントを「すべて」取得します。
GetComponentsInChildren GameObject や深さ優先探索を活用して、親子関係にある子オブジェクトから type のタイプのコンポーネントを「すべて」取得します。
GetComponentsInParent GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを「すべて」取得します。
SendMessageゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
SendMessageUpwardsゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
GetInstanceIDオブジェクトのインスタンス ID を返します
ToStringゲームオブジェクトの名前を返します

Static 関数

Destroyゲームオブジェクトやコンポーネント、アセットを削除します
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoad新しいシーンを読み込んでもオブジェクトが自動で破壊されないように設定します
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeタイプから見つけたすべてのアクティブのオブジェクト配列を返します
Instantiateoriginal のオブジェクトをクローンします

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961