Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Why Cinemachine Vcam been disabled in Build for no reason?

Discussion in 'Cinemachine' started by wesleywang, Nov 30, 2021.

  1. wesleywang

    wesleywang

    Joined:
    Sep 7, 2019
    Posts:
    5
    Everything works fine in Unity Editor. But when I create the Build version, the camera just doesn't follow the target. I found out that the CinamachineVirtualCamera has been Disabled, but it is enabled in Editor!!! I don't know why and I can't find other useful information through logs file.

    Build file Logs:
    upload_2021-11-30_23-5-13.png

    Editor Logs:
    upload_2021-11-30_23-5-36.png

    Debug Code:
    upload_2021-11-30_23-5-52.png

    And I'm sure that I have followed all the steps in the tutorial of Cinemachine Camera. It works fine in the Editor, but I don't know why it is not working in Standalone Build.
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    8,726
    My best guess (it's hard to diagnose without access to your project) is that you have multiple game objects with the tag 'camera' and with virtual camera on it? My guess is based on two things: tags are unreliable when it comes to search order, there is no guarantee that one always will be found than another and in your log, there is no 'gameobject is Enable' entry. You probably found another game object.
     
  3. wesleywang

    wesleywang

    Joined:
    Sep 7, 2019
    Posts:
    5
    Tag "Camera" is only used for debug. I add this tag to make it convenient to find that Vcam. And I think this can't explain why this virtual camera is disabled at standalone version.
     
  4. wesleywang

    wesleywang

    Joined:
    Sep 7, 2019
    Posts:
    5
    Is there any way that I can send you my project?
     
    Last edited: Dec 1, 2021
  5. wesleywang

    wesleywang

    Joined:
    Sep 7, 2019
    Posts:
    5
    Sorry, I don't know why. It just works today without any change... It's really weird.
     
  6. Halukx

    Halukx

    Joined:
    Feb 10, 2022
    Posts:
    1
    Help pls
     
unityunity