SCamera
| 函数 | TakePhoto | Triggers the Photo window in the UI, with the output of this camera. |
| 函数 | TakeSnapshot | Captures a texture from the camera, and saves it in a SResource |
| 属性 | HDR | Can this camera write HDR values? (i.e. values brighter than 1.0) |
| 属性 | PixelWidth | The width of this Camera's texture, in pixels |
| 属性 | PixelHeight | The height of this Camera's texture in pixels |
| 属性 | Velocity | World space speed of this camera, typically used for motion blur. |
| 属性 | UseOcclusionCulling | Is Occlusion Culling enabled on this camera? |
| 属性 | Enabled | Is this camera enabled? |
| 属性 | FieldOfView | The field of view of the camera, in typical scenarios, Sinespace uses a value of 52; however Unity will default to 60. |
| 属性 | Orthographic | Does this camera render without perspective? |
| 属性 | OrthographicSize | The width of the camera when in Orthographic mode. |
| 属性 | NearClip | How close can an object be to the camera plane before it is not rendered? |
| 属性 | FarClip | How far is an object from the camera plane before it is not rendered? |
| 属性 | GameObject | Returns a reference to the GameObject of this component. |
函数
TakePhoto
Triggers the Photo window in the UI, with the output of this camera. Perfect for photo booths.
返回值
void
示例
Space.Host.ExecutingObject.Camera.TakePhoto()
TakeSnapshot
Captures a texture from the camera, and saves it in a SResource
返回值
SResource
示例
Space.Host.ExecutingObject.Camera.TakeSnapshot()
属性
HDR
Can this camera write HDR values? (i.e. values brighter than 1.0)
示例
Space.Host.ExecutingObject.Camera.HDR = true
PixelWidth只读
The width of this Camera's texture, in pixels
示例
cameraWidthPixels = Space.Host.ExecutingObject.Camera.PixelWidth
PixelHeight只读
The height of this Camera's texture in pixels
示例
cameraHeightPixels = Space.Host.ExecutingObject.Camera.PixelHeight
Velocity只读
World space speed of this camera, typically used for motion blur.
示例
cameraVelocity = Space.Host.ExecutingObject.Camera.Velocity
UseOcclusionCulling
Is Occlusion Culling enabled on this camera?
示例
Space.Host.ExecutingObject.Camera.UseOcclusionCulling = true
Enabled
Is this camera enabled?
示例
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.
示例
Space.Host.ExecutingObject.Camera.FieldOfView = 70
Orthographic
Does this camera render without perspective?
示例
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
示例
Space.Host.ExecutingObject.Camera.OrthographicSize = 5.0
NearClip
How close can an object be to the camera plane before it is not rendered?
示例
Space.Host.ExecutingObject.Camera.NearClip = 2.0
FarClip
How far is an object from the camera plane before it is not rendered?
示例
Space.Host.ExecutingObject.Camera.FarClip = 6.0
GameObject只读
Returns a reference to the GameObject of this component.
示例
theGameObject = Space.Host.ExecutingObject.Camera.GameObject



