EntityComponentSystemSamples
EntityComponentSystemSamples copied to clipboard
Hybrid Occlusion doesn't seem to work
I tried running the hybrid occlusion in unity 2020 LTS but the occlusion doesn't work, the documentation says it should occlude something but mine shows 0 occluded:

I got the occlusion to work by opening the scene in a new project as someone suggested me to do and the occlusion worked.
Now the issue is getting occlusion to work in my own scenes, and I'm getting out of range exception errors when I put more than 1529 mesh objects in my scene (subscene or not, same problem):
IndexOutOfRangeException: Index -82 is out of range of '33' Length.
Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at <3be1a7ff939c43f181c0a10b5a0189ac>:0)
Unity.Collections.NativeArray`1[T].CheckElementReadAccess (System.Int32 index) (at <3be1a7ff939c43f181c0a10b5a0189ac>:0)
Unity.Collections.NativeArray`1[T].get_Item (System.Int32 index) (at <3be1a7ff939c43f181c0a10b5a0189ac>:0)
Unity.Rendering.Occlusion.MOCTestJob.Execute (Unity.Entities.ArchetypeChunk chunk, System.Int32 chunkIndex, System.Int32 firstEntityIndex) (at Library/PackageCache/[email protected]/Unity.Rendering.Hybrid/Occlusion/BurstIntrinsics/MOCTestJob.cs:83)
Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].ExecuteInternal (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/[email protected]/Unity.Entities/IJobChunk.cs:401)
Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].Execute (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/[email protected]/Unity.Entities/IJobChunk.cs:368)