Class ARCameraBackground
Add this component to a Camera
to copy the color camera's texture onto the background.
Inheritance
Namespace: UnityEngine.XR.ARFoundation
Syntax
public sealed class ARCameraBackground : MonoBehaviour
Remarks
This is the component-ized version of UnityEngine.XR.ARBackgroundRenderer
.
Properties
customMaterial
If useCustomMaterial is true
, this Material
will be used
instead of the one included with the platform-specific AR package.
Declaration
public Material customMaterial { get; set; }
Property Value
Type | Description |
---|---|
Material |
customRendererAsset
Get the custom ARBackgroundRendererAsset to use. This can assist with usage of the light weight render pipeline.
Declaration
public ARBackgroundRendererAsset customRendererAsset { get; set; }
Property Value
Type | Description |
---|---|
ARBackgroundRendererAsset |
material
The current Material
used for background rendering.
Declaration
public Material material { get; }
Property Value
Type | Description |
---|---|
Material |
useCustomMaterial
When false
, a material is generated automatically from the shader included in the platform-specific package.
When true
, customMaterial is used instead, overriding the automatically generated one.
This is not necessary for most AR experiences.
Declaration
public bool useCustomMaterial { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
useCustomRendererAsset
Whether to use a ARBackgroundRendererAsset. This can assist with usage of the light weight render pipeline.
Declaration
public bool useCustomRendererAsset { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |