I'm trying to access and change the bloom properties in Postprocessing component via script but I can't seem to find the namespace for UnityEngine.Rendering.PostProcessing. I have installed the PostProcessing package (v3.1.1) via unity package manager but still there are no PostProcessing namespace can someone help me with this ?
CodePudding user response:
So I have found a way around this issue. To anyone who still have issue and come to this post all you need to do is add
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
After you have install the univiersal render pipline and post processing package.Then you can access the bloom setting via the volume profile using
Bloom tempBloom = null;
volume.profile.TryGet<Bloom>(out tempBloom);
// anycode you want to add after
CodePudding user response:
Suggestions:
Try removing VS Code package from package manager and reimport it and then restart project and VS Code, it should work.
Note: some times VS Code takes time to or doesn't even recognize newly imported packages because of some VS Code extensions issue thats why people prefer using full IDEs like Rider or VS Community.
if you are using URP try declaring namespace:
using UnityEngine.Rendering.Universal
Hopefully it will help... happy coding :)