Decal Projector Component

Hi
Question is how to get access to Decal Projector Component via script?
I want to be able to change its size via code but no idea how to get access to it.

It Could be via ‘public’ variable or via ‘GetComponent’ but can’t find the solution.

Did you know the entire package is apparently available here?

https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/Decal-Projector

Should nail down what it is and how to grab ahold of it. If you say it is a Component then I can’t imagine why .GetComponent<>() and of course .AddComponent<>() wouldn’t work…

1 Like

if it was easy, I wouldn’t ask :wink:
Maybe I’m missing some ‘using’ here.
As for now, I can’t make public DecalProjector to drag-drop from inspector.
There is also no GetComponent() or something similar.

You are probably missing the “using” relative to the render pipeline
For HDRP: using UnityEngine.Rendering.HighDefinition;
For URP: using UnityEngine.Rendering.Universal;

You should be able to acces it now