SCamera
On this classTakePhoto
| Function | TakePhoto | Triggers the Photo window in the UI, with the output of this camera. |
| Function | TakeSnapshot | Captures a texture from the camera, and saves it in a SResource |
| Property | HDR | Can this camera write HDR values? (i.e. values brighter than 1.0) |
| Property | PixelWidth | The width of this Camera's texture, in pixels |
| Property | PixelHeight | The height of this Camera's texture in pixels |
| Property | Velocity | World space speed of this camera, typically used for motion blur. |
| Property | UseOcclusionCulling | Is Occlusion Culling enabled on this camera? |
| Property | Enabled | Is this camera enabled? |
| Property | FieldOfView | The field of view of the camera, in typical scenarios, Sinespace uses a value of 52; however Unity will default to 60. |
| Property | Orthographic | Does this camera render without perspective? |
| Property | OrthographicSize | The width of the camera when in Orthographic mode. |
| Property | NearClip | How close can an object be to the camera plane before it is not rendered? |
| Property | FarClip | How far is an object from the camera plane before it is not rendered? |
| Property | GameObject | Returns a reference to the GameObject of this component. |
Functions
TakePhoto
Triggers the Photo window in the UI, with the output of this camera. Perfect for photo booths.
Returns
void
Example
Space.Host.ExecutingObject.Camera.TakePhoto()
TakeSnapshot
Captures a texture from the camera, and saves it in a SResource
Returns
SResource
Example
Space.Host.ExecutingObject.Camera.TakeSnapshot()
Properties
HDR
Can this camera write HDR values? (i.e. values brighter than 1.0)
Example
Space.Host.ExecutingObject.Camera.HDR = true
PixelWidthRead only
The width of this Camera's texture, in pixels
Example
cameraWidthPixels = Space.Host.ExecutingObject.Camera.PixelWidth
PixelHeightRead only
The height of this Camera's texture in pixels
Example
cameraHeightPixels = Space.Host.ExecutingObject.Camera.PixelHeight
VelocityRead only
World space speed of this camera, typically used for motion blur.
Example
cameraVelocity = Space.Host.ExecutingObject.Camera.Velocity
UseOcclusionCulling
Is Occlusion Culling enabled on this camera?
Example
Space.Host.ExecutingObject.Camera.UseOcclusionCulling = true
Enabled
Is this camera enabled?
Example
Space.Host.ExecutingObject.Camera.Enabled = true
--clicking this object will Enable/Disable it's Camera component
thisGameObject = Space.Host.ExecutingObject
component = thisGameObject.Camera
OnClick = function()
component.Enabled = not component.Enabled
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
FieldOfView
The field of view of the camera, in typical scenarios, Sinespace uses a value of 52; however Unity will default to 60.
Example
Space.Host.ExecutingObject.Camera.FieldOfView = 70
Orthographic
Does this camera render without perspective?
Example
Space.Host.ExecutingObject.Camera.Orthographic = true
OrthographicSize
The width of the camera when in Orthographic mode. Height will be adjusted based on aspect ratio of the Render Texture
Example
Space.Host.ExecutingObject.Camera.OrthographicSize = 5.0
NearClip
How close can an object be to the camera plane before it is not rendered?
Example
Space.Host.ExecutingObject.Camera.NearClip = 2.0
FarClip
How far is an object from the camera plane before it is not rendered?
Example
Space.Host.ExecutingObject.Camera.FarClip = 6.0
GameObjectRead only
Returns a reference to the GameObject of this component.
Example
theGameObject = Space.Host.ExecutingObject.Camera.GameObject



