- Home /
Question by
infrared511 · Jun 11, 2020 at 04:57 AM ·
c#camerascript.
Setting Virtual Camera by Script
Is there a way through script to set a specific virtual camera? Having multiple cameras in a scene, I want to be able to choose which virtual camera starts when the game launches. For example the game always starts a new game in area 1 with Vcam1. If I save the player position in area 2 which uses Vcam2, then load the saved player starting position which is now in area 2, Vcam 1 still starts by default. I would like to know how to choose which Vcam starts, so no matter what area the player loads into, the correct virtual camera will be selected . The only way I can find getting the virtual camera is CinemachineBrain.ActiveVirtualCamera which gets the current virtual camera, but this doesn't help me.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613000637im_/https://answers.unity.com/themes/thub/images/avi.jpg)