So I need some guidance in the proper way to use multiple brains. With one brain in the scene Cinemachine functions perfectly. With more than one it freaks out and spins the cameras wildly. I want some cameras to be cuts, some to be blends, but using the blend list relies on the assumption that cameras already existed in the scene and I set up all the blends before hand.
I dynamically create my cutscens / cameras (ala Mass Effect)
My main interest is in using the Cinemachine Track in timeline, which seems to naturally want to have a static reference to the brain. But that reference I don’t necessarily know where its going to be at run-time. I really wish Cinemachine and timeline could work together globally alter the blend type. I just don’t have the kind of game where everything is static and in one big scene.
Is there no way to use multiple brains on the same layer?
I think this is what you’ll need. It will allow you to bind the brain component of a camera to a cinemachine track. You can use any Camera GO, not just Camera.main.
ah So i should write a component that looks for all cinemachine tracks under the heirarchy and fills in the brain with the current global brain?
I think the Cinemachine Track is probably overkill for this. I bet im better off just writing custom timeline tracks to alter the global brain’s blend modes
I don’t understand why you need multiple brains. The paradigm is this:
1 Unity Camera, with a brain on it.
Multiple vcams, on separate game objects. The active vcam drives the Unity camera at all times.
When you have an active CM Timeline track for the brain, its clips override the current active vcam. Blends are controlled by overlapping the clips in the timeline asset.
the previous post described how to dynamically bind scene objects to timeline assets
If that doesn’t help, maybe you can describe a little more fully what you’re trying to achieve, and where it’s going wrong.
Not a great idea to alter the brain’s global blend mode IMO. Better to set up a Custom Blends asset on it, and configure it for the different blends you need. Vcam lookup is name-based for the blends, so just having a good naming system for them will accomplish the dynamic bindings.
so it doesn’t seem to be string based. It creates a magic enum out of scene assets. my cameras are all contained under a prefab. So how does it work under the hood? Can i just enter the string somewhere?
ok a good custom solution for this is to make N blend settings for whatever kind of blends you want and then at runtime SET the global brain to these settings