Cinemachine support?

Is there any form of basic support of Cinemachine? Or any example of Camera switching somewhere?

Original Post on Discord

by user 732122195614105653

There is currently no support for cinemachine.

Cameras can be switched be either disabling / enabling them (you can see an example at Needle Engine Samples in the multi scene sample) or by calling this.context.setCurrentCamera with the camea you want to set active

Do I understand that, unlike in Unity, there’s no overhead of having several cameras active at a time ?

by user 732122195614105653

Only one camera is by default used for rendering per frame so its no problem

And when you call setCurrentCamera its just added to a stack where only the topmost camera is used (with that you can just remove your last camera added and it will automatically switch back to the camera that was previously active)

That being said: having multiple cameras and rendering to rendertargets is of course also possible but you have to make the render calls yourself in that case. An example can be found in the samples repository currently in Misc-scripting i think

Is “needle-engine-samples\assets\Runtime\Stencil Portals\Stencil Portals.unity” an example of this?

by user 581381221087445033

No, that is just one camera but using stencil masks to create the portal effect (effectively masking multiple overlaying scenes)