How to set render CustomDepth Pass?

As I remember you need to set up in project settings / rendering / post processing / Custom Depth Stencil Pass - set it to enabled with stencil

Hey Gusy! I followed the tutorial to implement outline for actor successful, but I want to enable/disable to set this property, and have no success :(. Any ideas?

I tried these ways not working.

Comp.bRenderCustomDepth = true or Comp.SetRenderCustomDepth(true)

Thanks!

Thank for you reply, I check this option and other options, still no highlight :frowning:

Here is my code:

SM = CreateDefaultSubobject(FName(“SM”));
SM->SetRenderCustomDepth(true);
SM->bRenderCustomDepth = true;
SM->MarkRenderStateDirty();

Thank you Anyway!

Just noticed, after call to SetRenderCustomDepth(true) you do not need to set anything else. SetRenderCustomDepth inside sets bRenderCustomDepth and calls MarkRenderStateDirty();

But I wander, why do you call CreateDefaultSubobject? You need to highlight a mesh, right? So call it on a mesh.

Yeah, you are right. I set it wrong method which is construction method, I changed it to overlap, and call it by mes, finally it works. thanks for the solution. :slight_smile: