docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CylinderLayerData

    Subclass of LayerData that defines a cylindrical area of the display that will be rendered with some assigned texture by the current ILayerProvider. The cylinder is centered at the transform location.

    Inheritance
    object
    LayerData
    CylinderLayerData
    Inherited Members
    LayerData.BlendTypeDirectly
    LayerData.BlendType
    LayerData.ReportStateChange
    LayerData.UpdateValue<T>(T, T)
    LayerData.Validate(CompositionLayer)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.XR.CompositionLayers.Layers
    Assembly: Unity.XR.CompositionLayers.dll
    Syntax
    [Serializable]
    public class CylinderLayerData : LayerData

    Properties

    ApplyTransformScale

    Whether or not to apply the transform scale properties to the layer. When true, the scale of the transform will be applied to the length of the arc, height, and radius respectively.

    Declaration
    public bool ApplyTransformScale { get; set; }
    Property Value
    Type Description
    bool

    AspectRatio

    The ratio of the visible cylinder section width / height.

    Declaration
    public float AspectRatio { get; set; }
    Property Value
    Type Description
    float

    CentralAngle

    The angle of the visible section of the cylinder, based at 0 radians, in the range of [0, 2Pi).

    Declaration
    public float CentralAngle { get; set; }
    Property Value
    Type Description
    float

    CentralAngleInDegrees

    The angle of the visible section of the cylinder, based at 0 radians, in the range of [0, 360).

    Declaration
    public float CentralAngleInDegrees { get; set; }
    Property Value
    Type Description
    float

    MaintainAspectRatio

    Option to make the aspect ration stay constant.

    Declaration
    public bool MaintainAspectRatio { get; set; }
    Property Value
    Type Description
    bool

    Radius

    Defines the radius of the cylindrical layer centered at the transform location.

    Declaration
    public float Radius { get; set; }
    Property Value
    Type Description
    float

    Methods

    CalculateAspectRatioFromHeight(float)

    Return aspect ratio when changing height.

    Declaration
    public float CalculateAspectRatioFromHeight(float height)
    Parameters
    Type Name Description
    float height

    cylinder layer height

    Returns
    Type Description
    float

    Return re-calculated aspect ratio.

    CalculateRadiusFromHeight(float)

    Return radius when changing height.

    Declaration
    public float CalculateRadiusFromHeight(float height)
    Parameters
    Type Name Description
    float height

    cylinder layer height

    Returns
    Type Description
    float

    Return re-calculated radius.

    CopyFrom(LayerData)

    Used to copy values from another layer data instance

    Declaration
    public override void CopyFrom(LayerData layerData)
    Parameters
    Type Name Description
    LayerData layerData

    Layer data to copy from

    Overrides
    LayerData.CopyFrom(LayerData)

    GetHeight()

    Return height value of the cylinder layer.

    Declaration
    public float GetHeight()
    Returns
    Type Description
    float

    cylinder layer height value.

    GetScaledSize(Vector3)

    Return re-calculated parameters based on whether or not apply the transform scale properties.

    Declaration
    public Vector3 GetScaledSize(Vector3 scale)
    Parameters
    Type Name Description
    Vector3 scale

    transform scale

    Returns
    Type Description
    Vector3

    Return re-calculated cylinder params.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)