Breakroom is now Sinewave Campus. Book a meeting

SCamera

العميلالمكونات
في هذا الصنفTakePhoto
  1. الدوال
  2. TakePhoto
  3. TakeSnapshot
  4. الخصائص
  5. HDR
  6. PixelWidth
  7. PixelHeight
  8. Velocity
  9. UseOcclusionCulling
  10. Enabled
  11. FieldOfView
  12. Orthographic
  13. OrthographicSize
  14. NearClip
  15. FarClip
  16. GameObject
الأعضاء 14
دالةTakePhotoTriggers the Photo window in the UI, with the output of this camera.
دالةTakeSnapshotCaptures a texture from the camera, and saves it in a SResource
خاصيةHDRCan this camera write HDR values? (i.e. values brighter than 1.0)
خاصيةPixelWidthThe width of this Camera's texture, in pixels
خاصيةPixelHeightThe height of this Camera's texture in pixels
خاصيةVelocityWorld space speed of this camera, typically used for motion blur.
خاصيةUseOcclusionCullingIs Occlusion Culling enabled on this camera?
خاصيةEnabledIs this camera enabled?
خاصيةFieldOfViewThe field of view of the camera, in typical scenarios, Sinespace uses a value of 52; however Unity will default to 60.
خاصيةOrthographicDoes this camera render without perspective?
خاصيةOrthographicSizeThe width of the camera when in Orthographic mode.
خاصيةNearClipHow close can an object be to the camera plane before it is not rendered?
خاصيةFarClipHow far is an object from the camera plane before it is not rendered?
خاصيةGameObjectReturns a reference to the GameObject of this component.

الدوال​

TakePhoto​

void TakePhoto()

Triggers the Photo window in the UI, with the output of this camera. Perfect for photo booths.

القيم المرجعة

void

مثال

Lua
Space.Host.ExecutingObject.Camera.TakePhoto()

TakeSnapshot​

SResource TakeSnapshot()

Captures a texture from the camera, and saves it in a SResource

القيم المرجعة

SResource

مثال

Lua
Space.Host.ExecutingObject.Camera.TakeSnapshot()

الخصائص​

HDR​

bool HDR {get; set; }

Can this camera write HDR values? (i.e. values brighter than 1.0)

مثال

Lua
Space.Host.ExecutingObject.Camera.HDR = true

PixelWidthللقراءة فقط​

int PixelWidth {get; }

The width of this Camera's texture, in pixels

مثال

Lua
cameraWidthPixels = Space.Host.ExecutingObject.Camera.PixelWidth

PixelHeightللقراءة فقط​

int PixelHeight {get; }

The height of this Camera's texture in pixels

مثال

Lua
cameraHeightPixels = Space.Host.ExecutingObject.Camera.PixelHeight

Velocityللقراءة فقط​

SVector Velocity {get; }

World space speed of this camera, typically used for motion blur.

مثال

Lua
cameraVelocity = Space.Host.ExecutingObject.Camera.Velocity

UseOcclusionCulling​

bool UseOcclusionCulling {get; set; }

Is Occlusion Culling enabled on this camera?

مثال

Lua
Space.Host.ExecutingObject.Camera.UseOcclusionCulling = true

Enabled​

bool Enabled {get; set; }

Is this camera enabled?

مثال

Lua
Space.Host.ExecutingObject.Camera.Enabled = true
Lua
--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​

float FieldOfView {get; set; }

The field of view of the camera, in typical scenarios, Sinespace uses a value of 52; however Unity will default to 60.

مثال

Lua
Space.Host.ExecutingObject.Camera.FieldOfView = 70

Orthographic​

bool Orthographic {get; set; }

Does this camera render without perspective?

مثال

Lua
Space.Host.ExecutingObject.Camera.Orthographic = true

OrthographicSize​

float OrthographicSize {get; set; }

The width of the camera when in Orthographic mode. Height will be adjusted based on aspect ratio of the Render Texture

مثال

Lua
Space.Host.ExecutingObject.Camera.OrthographicSize = 5.0

NearClip​

float NearClip {get; set; }

How close can an object be to the camera plane before it is not rendered?

مثال

Lua
Space.Host.ExecutingObject.Camera.NearClip = 2.0

FarClip​

float FarClip {get; set; }

How far is an object from the camera plane before it is not rendered?

مثال

Lua
Space.Host.ExecutingObject.Camera.FarClip = 6.0

GameObjectللقراءة فقط​

SGameObject GameObject {get; }

Returns a reference to the GameObject of this component.

مثال

Lua
theGameObject = Space.Host.ExecutingObject.Camera.GameObject