Struct Camera2DRenderToTexture
Add this component to the same entity as Camera2D to render to a texture instead of to the screen.
Namespace: Unity.Tiny.Core2D
Syntax
public struct Camera2DRenderToTexture : IComponentData
Fields
freeze
Freeze render to texture operation. Setting this flag to true skips re-rendering the texture. It is a lightweight way to temporarily disable render to texture for this camera without de-allocations.
Declaration
public bool freeze
Field Value
| Type | Description |
|---|---|
| System.Boolean |
height
Height of the target render texture. Must be a power of two.
Declaration
public int height
Field Value
| Type | Description |
|---|---|
| System.Int32 |
target
The target entity to render to. If NONE, this entity is used. The target entity must have an Image2D and an Image2DRenderToTexture component.
Declaration
public Entity target
Field Value
| Type | Description |
|---|---|
| Entity |
width
Width of the target render texture. Must be a power of two.
Declaration
public int width
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Properties
Default
Declaration
public static Camera2DRenderToTexture Default { get; }
Property Value
| Type | Description |
|---|---|
| Camera2DRenderToTexture |