Class VolumeCamera
Inherited Members
Namespace: Unity.PolySpatial
Assembly: Unity.PolySpatial.dll
Syntax
[Icon("Camera Gizmo")]
public class VolumeCamera : MonoBehaviour
Fields
OnWindowEvent
An event that is triggered when this volume camera's window changes state. Changing states can mean window actions such as the window opening or the window becoming unfocused.
Declaration
[SerializeField]
[Tooltip("An event that is triggered when this volume camera's window changes state.")]
public UnityEvent<VolumeCamera.WindowState> OnWindowEvent
Field Value
Type | Description |
---|---|
Unity |
OpenWindowOnLoad
Declaration
[SerializeField]
[Tooltip("If true, a window is automatically opened for this volume camera when loaded. If false, the window must be opened manually via OpenWindow().")]
public bool OpenWindowOnLoad
Field Value
Type | Description |
---|---|
bool |
Properties
CullingMask
Only objects in the selected layers will be visible inside this Volume Camera.
Declaration
public LayerMask CullingMask { get; set; }
Property Value
Type | Description |
---|---|
Layer |
Dimensions
Defines the (unscaled) size of the camera's bounding box. The box is centered at the position of the VolumeCamera’s transform.
Declaration
public Vector3 Dimensions { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
The effective, world space dimensions of the bounding box are calculated by multiplying the Dimensions by the transform's scale.
When you set the volume camera Mode to Bounded, the camera only displays GameObjects within the scaled bounding box. A bounding box is not used when you set the Mode to Unbounded.
OutputDimensions
The dimensions in meters of the actual output size of the volume camera. May be different than Dimensions, in which case the space described by Dimensions is scaled to fit the OutputDimensions.
Declaration
public Vector3 OutputDimensions { get; }
Property Value
Type | Description |
---|---|
Vector3 |
VolumeSpaceToWorldSpaceMatrix
Declaration
public Matrix4x4 VolumeSpaceToWorldSpaceMatrix { get; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
WindowConfiguration
Declaration
public VolumeCameraWindowConfiguration WindowConfiguration { get; set; }
Property Value
Type | Description |
---|---|
Volume |
WindowFocused
Returns true if a window that is showing the contents of this volume camera is focused.
Declaration
public bool WindowFocused { get; }
Property Value
Type | Description |
---|---|
bool |
WindowMode
The mode this volume camera will display its content in, Bounded or Unbounded.
Declaration
public VolumeCamera.PolySpatialVolumeCameraMode WindowMode { get; }
Property Value
Type | Description |
---|---|
Volume |
WindowOpen
Returns true if a window is open and showing the contents of this volume camera.
Declaration
public bool WindowOpen { get; }
Property Value
Type | Description |
---|---|
bool |
WorldSpaceToVolumeSpaceMatrix
Declaration
public Matrix4x4 WorldSpaceToVolumeSpaceMatrix { get; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
Methods
CloseWindow()
Request that the OS close the window that is showing the contents of this volume camera. Does nothing if the window is not open.
Declaration
public void CloseWindow()
OpenWindow()
Request that a window is opened to show the contents of this volume camera. Does nothing if the window is already open.
Declaration
public void OpenWindow()