docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CreateCubeCamera

    CreateCubeCamera(GameObject, CameraDesc, uint)

    Creates up to 6 cameras based on the cameraConfig mask, used for rendering into a cube map while preserving temporal effects.

    Declaration
    public static Camera[] CreateCubeCamera(GameObject parent, CameraDesc desc, uint faceMask = 63)
    Parameters
    Type Name Description
    GameObject parent

    Game object to attach cameras to.

    CameraDesc desc

    Description of the camera, lens parameters are not considered, field of view is always 90 degrees

    uint faceMask

    Bitmask indication which faces to create a camera for, rest of the faces will be null. This bit mask corresponds to values in UnityEngine.CubemapFace.

    Returns
    Type Description
    Camera[]

    List of cameras in the order of [+x, -x, +y, -y, +z, -z], this is such that if the faces are copied to a cubemap in the order of UnityEngine.CubemapFace, then the (0, 0, 1) texel coordinate will be the camera look direction.

    In This Article
    Back to top
    Copyright © 2024 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)