Class RenderTextureTag
Allows control over whether a camera with a render texture should use a host-side local render texture, or if the texture data should be streamed over every frame, during a PlayToDevice connection.
Inherited Members
Namespace: Unity.PolySpatial
Assembly: Unity.PolySpatial.dll
Syntax
[RequireComponent(typeof(Camera))]
[DisallowMultipleComponent]
public class RenderTextureTag : MonoBehaviour
Remarks
Add this RenderTextureTag
component to the same GameObject as a Camera component
for it to take effect, and set the enum appropriately. The camera component must also have a RenderTexture it is rendering to. By default,
if this component doesn't exist, PlayToDevice will attempt to use host-side local render textures if the platform supports it - otherwise,
otherwise for platforms like visionOS it will fall back to streaming render textures.
Using a local render texture may speed up render texture performance significantly over PlayToDevice.
Properties
RenderTextureMode
Set this value to control how render textures should be handled over PlayToDevice.
Declaration
public RenderTextureTag.PolySpatialRenderTextureMode RenderTextureMode { get; set; }
Property Value
Type | Description |
---|---|
RenderTextureTag.PolySpatialRenderTextureMode |