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

Question Does ClearShot require child virtual cameras to actually be children of the ClearShot?

Discussion in 'Cinemachine' started by PraetorBlue, Jul 20, 2020.

  1. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,893
    My goal is to dynamically add child vcams to my ClearShot. The ClearShot is part of a prefab that I use in multiple scenes, but the vcams I want to add are part of each individual scene. I don't seem to be able to drag the vcams from my scene into the ClearShot's child camera list. Is there any way to add virtual cameras that are not children of the ClearShot to the ClearShot's child camera list? Can it be done from a script?
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,893
    I solved my problem by creating the actual VirtualCameras at runtime as children of the ClearShot instead of including them in the unrelated prefab. Then I just set the Follow target to a transform in my prefab.
     
    gaborkb and Gregoryl like this.