Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our 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:
    15
    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:
    7,658
    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:
    15
    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:
    7,658
    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.