CullingGroup broken?

Any chance the CullingGroup API is broken in this release? Everything is returning that it’s not visible / outside the furthest distance band, though it was working correctly a few Unity versions ago. Maybe there’s something wrong in my code but it seems like the CullingGroup is just not tracking anything.

Hi makeshiftwings,
Could you please submit a bug report with a minimal reproduction case for this issue and reply in here with the case #?

I didn’t want to submit a bug report until I was sure it wasn’t something I was doing. I messed around with it some more, and the culling group does work, but for some reason the distances are off by a factor of 10. I had to set my distance band to 200 in order to cull things 20 units from the camera. I’ll see if I can get a repro case later today.

As far as I know, there have been no changes to the CullingGroup code recently.

Is it possible you have a scale factor applied to your camera, or something like that?

1 Like

That was my first suspicion too but I couldn’t find any scaling on any of the transforms related to the camera or the things I was culling, so I’m not sure what’s causing it. I’ll see if I can get a repro on a clean project if I have time today.

1 Like

Culling group queryIndices always returns 0 when two cameras are in the scene.

1 Like

The culling group API has been busted for a while. I posted about it a couple months ago but never had any replies. You don’t really need a submission as it’s dead simple to reproduce. Just use a render texture for your camera and presto, the query methods will now no longer cull visible points.

That might have had something to do with it for me as well at first. I did have a second cam with a render texture in one scene, but I removed it. The culling distances are still off by a factor of 10 for me though, even with just one camera in the scene.

Ah, didn’t see the bit about distances in your original post. In my situation I’m working with a top-down view so it was easy enough to work around the culling by simply using distance bands. But now that I think about, I do recall having to use an unexpectedly large radius for the first band. I don’t think it was off by a factor of 10 like yours but it might have been off by 2 or 3x.

We always need a reproduction - that’s our process for tracking, prioritising and resolving issues. Combing the forums to find “the next bug to fix” doesn’t scale well :slight_smile:

1 Like

Ah, good point on that. I’ll have to leave it up to the OP since my internet accessibility is very limited at this time.

1 Like