Hello!
I'm somewhat new to AC and have been setting up a game where I'd like to integrate Cinemachine and use the latest Post processing stack. I set up a custom camera with the CM brain and everything seemed fine.
My main camera has a DOF setting that I wanted to alter on my Virtual Cameras. I was attempting to use the PP script that passes the depth to the main camera on the Wikia but it's yielding errors about the Post Processing namespace.
A Google search yielded a discussion about namespace issues with v2.0 of the Post processing stack and it was suggested to move any scripts referencing the PP to the folders it resides in. However, with Unity 2018.2 and the package management system, I can no longer alter anything within the package folders it seems.
Any suggestions would be appreciated!
(I'm using Unity 2018.2.0f and the latest package additions of Cinemachine and Post Processing through the package manager.)
Comments
What's the link for the discussion you're referring to?
So far as AC's camera system goes, each GameCamera has their own DOF setting which is passed to the AC MainCamera when made active. The MainCamera's DOF can then be retrieved through script with:
AC.KickStarter.mainCamera.GetFocalDistance ();
If you're relying on CM cameras instead, however, then that likely won't apply.
Cinemachine will render any settings in a global PP volume as the deafult unless an override is attached to a particular virtual camera. So, for some virtual cameras I've made override volumes to change the DOF on a per-camera basis as seen below:
However, when using an override volume with just a different DOF than my main AC camera, I don't see any changes in the final DOF, even while adjusting the values in-game.
I was also trying to use the script on the wikia to pass the DOF values but it's giving me namespace errors.
Here's a mention about that: https://forum.unity.com/threads/using-unityengine-postprocessing-not-found.507651/ One of the suggestions is to move files but as I mentioned that's no longer possible due to the package management system it seems.
There's previously conflicting info regarding the namespace issue, which is a Unity issue itself it sounds like: https://stackoverflow.com/questions/50400363/the-type-or-namespace-name-postprocessing-does-not-exis...
However, right now I'm not even using Cinemachine and just trying to get standard Game Cameras to pass their DOF but it seems I'm still not getting the effect passed to the AC Main Camera.
For DOF to work should I go back to a v1 Post Processing profile so it will pass properly to the AC Main Camera?
I've had AC for a while but just now got around to making a substantial game with it and it's truly one of the top tier Unity assets. Amazing product for sure!