Search Unity

Virtual Cameras break upon Play

Discussion in 'Cinemachine' started by Meltage, Jan 25, 2018.

  1. Meltage

    Meltage

    Joined:
    Dec 18, 2017
    Posts:
    11
    Hi I have a problem with my virtual cameras breaking on Play. When I run the timeline (just pressing space and view the game window) the virtual cameras work, but as soon as I Play, they break. After playing, I have to select the first virtual camera in the list to unbreak the Vcameras, but they break again upon Polay.

    Curiously, I can use the Record to record the Vcameras on playing, although the window show only one of the cameras. The recorded movie clip is upside down and mirrored.

    I have tried to remove extensions form cameras, remove one Vcamera at a time to see which one is broken. There is no error message except that Unity doenst recognice the script file for the virtual camera post profile (and fixes it, the message says).

    I have the latest Cinemachine and Post Processing Stack (unsure if its v1 or v2).
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    This is hard to diagnose based on the information you provided. Any chance you could zip up your project and send it?
     
    Meltage likes this.
  3. Meltage

    Meltage

    Joined:
    Dec 18, 2017
    Posts:
    11
    Thank you. I can send it without the asset folder? Not sure if that will work for troubleshooting.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    You must include the asset folder. You can delete all other folders. Tell me which scene to open, and what to do to repro the problem.

    Even better, export the problem scene as an asset, together with all dependencies. Then I can install it in an empty project.
     
  5. Meltage

    Meltage

    Joined:
    Dec 18, 2017
    Posts:
    11
    wow my scene with dependencies was only 20mb .. my asset folder is 1,5 gb (I know Im not using everything, but still). My internet connection is so bad, it still takes 1-2hrs to upload that, though. But its coming
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @Meltage Thanks for upping the project.

    The problem is that you have somehow created multiple Unity Cameras in your scene, and there is no guarantee which one will be dominant. With Cinemachine, there must be only one Unity Camera, equipped with a CinemachineBrain component, so that it can be driven by the many virtual cameras in your scene. Virtual cameras should not have active Camera components.

    Searching your scene for Camera components, I found this:

    upload_2018-1-28_15-12-38.png

    If you delete all the Camera components other than the Main Camera, it works fine.
     
    Meltage likes this.
  7. Meltage

    Meltage

    Joined:
    Dec 18, 2017
    Posts:
    11
    Thanks a lot! So glad I got help so quickly. I should have thought oif asking during the neon challenge, but had no expectation of getting help fast enough.

    So for the developers - better display a warnign message in the UI next to the component (as Unity does in many other cases) when a camera component is on a virtual camera. I hav eno idea how it got there :)

    Thanks again Gregoryl