Search Unity

Cinemachine script to change background?

Discussion in 'Cinemachine' started by yellsellsg, Feb 10, 2020.

  1. yellsellsg

    yellsellsg

    Joined:
    Jan 21, 2020
    Posts:
    3
    upload_2020-2-10_11-23-52.png

    Trying to find how to script the background color for cinemachinevirtualcamera

    vcam = GameObject.Find("vcam1").GetComponent<CinemachineVirtualCamera>();
    vcam.LookAt = tFollowTarget; // this works, so i know cam is working
    co= new Color32(113, 179, 221, 255);

    vcam.backgroundColor = co; // will not compile gives

    upload_2020-2-10_11-28-30.png

    Been scouring posts documentation etc but i can't find an answer?
    Thank U kindly.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,394
    A CinemachineVirtualCamera is not a Camera. It's just an object intended to control the position of a Camera. You will find the Background setting where it always was: on the Camera object, not on the VirtualCamera.
     
unityunity