NWH Common
Search Results for

    Show / Hide Table of Contents

    Class CameraChanger

    Switches between the camera objects that are children to this object and contain camera tag, in order they appear in the hierarchy or in order they are added to the vehicle cameras list.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    CameraChanger
    Namespace: NWH.Common.Cameras
    Assembly: NWH.Common.dll
    Syntax
    [DefaultExecutionOrder(20)]
    public class CameraChanger : MonoBehaviour

    Fields

    | Edit this page View Source

    autoFindCameras

    If true vehicleCameras list will be filled through cameraTag.

    Declaration
    [Tooltip("    If true vehicleCameras list will be filled through cameraTag.")]
    public bool autoFindCameras
    Field Value
    Type Description
    bool
    | Edit this page View Source

    cameras

    List of cameras that the changer will cycle through. Leave empty if you want cameras to be automatically detected. To be detected cameras need to have camera tag and be children of the object this script is attached to.

    Declaration
    [FormerlySerializedAs("vehicleCameras")]
    [Tooltip("List of cameras that the changer will cycle through. Leave empty if you want cameras to be automatically detected. To be detected cameras need to have camera tag and be children of the object this script is attached to.")]
    public List<GameObject> cameras
    Field Value
    Type Description
    List<GameObject>
    | Edit this page View Source

    currentCameraIndex

    Index of the camera from vehicle cameras list that will be active first.

    Declaration
    [Tooltip("    Index of the camera from vehicle cameras list that will be active first.")]
    public int currentCameraIndex
    Field Value
    Type Description
    int

    Methods

    | Edit this page View Source

    NextCamera()

    Activates the next camera in the list, cycling back to the first camera when reaching the end. Automatically disables all other cameras and their AudioListeners.

    Declaration
    public void NextCamera()
    | Edit this page View Source

    PreviousCamera()

    Activates the previous camera in the list, cycling back to the last camera when reaching the beginning. Automatically disables all other cameras and their AudioListeners.

    Declaration
    public void PreviousCamera()
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics