Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Efficient way to manage many many virtual cameras

Discussion in 'Cinemachine' started by xiaofan1228, Nov 24, 2021.

  1. xiaofan1228

    xiaofan1228

    Joined:
    Nov 19, 2021
    Posts:
    10
    I want to maintain the hierachy clean, but turn out finding the state-driven camera could only grab the child_cam, but not the child_child_cam, that makes it hard to manage correspond to function module.

    In my project there are more than 30 V-cams, does that means I have to make them all in the same hierachy? Or is there another better way for camera management?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    5,557
    If you use StateDrivenCamera, then your vcams have to be its direct children. Is StateDrivenCamera the best option for you? That depends on how and why you are using it. Can you describe in more detail?
     
  3. xiaofan1228

    xiaofan1228

    Joined:
    Nov 19, 2021
    Posts:
    10
    Well, I'm working on an automobile control system, as there're many control details, like door lock, AC, seat, window, bla bla... Many vcams up to 30 in the scene already. As there are some base consume even vcam is standby, deactivating certain vcams to save processing power seems promising, but it's really headache to do this from same hierachy, so...
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    5,557
    I understand that, but why use a StateDrivenCamera? You can instead put the vcams in some arbitrary hierarchy (but don't make them descendants of each other), and then manipulate the priorittes - or activate/deactivate them if you prefer - from a script.
     
unityunity