Hello!
I used to acces the CinemachineBasicMultiChanelPerlin with GetCineMachineComponent on the virtualCamera, now, Im trying to acces the same component on Cinemachine 3.1.2 and im having no luck, does someone know how to acces it on the new version?
Have you found the noise section in the documentation? That will be the first place to start… I know it can be confusing because Google will return you other versions of the docs, but until you find it in the docs, you can’t be sure you’re using it.
And once added the Noise from inspector, how can I modify it trhough code???
I have looked in the cinemachine docs, but I cant seem to find any way to modify the values trhough code :((.
It’s the same way you modify any behaviour. Get the component and modify the public fields. What changes to you want to make?
For those who found this at the top of Google results and were flabbergasted by Gregoryl’s answers above: basically what used to be
var noice = _cam.GetCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
is now
var noise = _cam.GetComponent<CinemachineBasicMultiChannelPerlin>();
There’s also a NEW function _cam.GetCinemachineComponent but for the life of me I don’t understand its purpose. It seems like it only exists to confuse the people who came from an older Unity version.
I mean getting a component is a general Unity thing and not specific to cinemachine. You don’t need the cinemachine dev to tell you how to do that.
The signature is:
public T GetCinemachineComponent<T>() where T : CinemachineComponentBase
So its just a GetComponent call that has T constrained rather than being unconstrained.
