<translate>The '''Camera''' component represents a [https://docs.unity3d.com/ScriptReference/Camera.html Unity Camera] which is centered on the slot and facing in the forward (+z) [[Direction]].</translate>
The '''Camera''' component represents a [https://docs.unity3d.com/ScriptReference/Camera.html Unity Camera] which is centered on the slot and facing in the [[Coordinate spaces#Directions|forward direction]].
<!--T:2-->
== Fields ==
== Fields ==
Line 33:
Line 30:
}}
}}
<!--T:3-->
== Usage ==
== Usage ==
<translate>Put the component onto a slot, and position the slot. The produced image can either be accesed through a [[Component:RenderTextureProvider|RenderTextureProvider]] component or by creating a [[Texture2D]] asset using the [[ProtoFlux:Render To Texture Asset|Render To Texture Asset]] Protoflux node.</translate>
Put the component onto a slot, and position the slot. The produced image can either be accesed through a [[Component:RenderTextureProvider|RenderTextureProvider]] component or by creating a [[Texture2D]] asset using the [[ProtoFlux:Render To Texture Asset|Render To Texture Asset]] Protoflux node.
{{Note|If a camera is connected to a [[Component:RenderTextureProvider|RenderTextureProvider]], it will flash its contents to the screen whenever any field of the RenderTextureProvider is changed. To work around this, be sure to set the <code>Depth</code> value on the Camera component to something below <code>0</code> if you plan to change any fields while it is active. See [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/964#issuecomment-2877264413 this comment on issue #964 for more information.]|warning}}
A list of SyncReferences to slots the camera is NOT allowed to render.
Usage
Put the component onto a slot, and position the slot. The produced image can either be accesed through a RenderTextureProvider component or by creating a Texture2D asset using the Render To Texture Asset Protoflux node.
If a camera is connected to a RenderTextureProvider, it will flash its contents to the screen whenever any field of the RenderTextureProvider is changed. To work around this, be sure to set the Depth value on the Camera component to something below 0 if you plan to change any fields while it is active. See this comment on issue #964 for more information.
Examples
Security cameras, drones, picture takers, layered texture bakers, scanners, and more.