I’m seeing the burst error: ```Unable to access the managed method object.Equals(object)
from type `Unity.Rendering.FrozenRenderSceneTag````
In a job, I’m running: commandBuffer.AddSharedComponent<FrozenRenderSceneTag>(entityInQueryIndex, entity, frozenTag);
frozenTag is a local variable. If I add .WithoutBurst()
to the Entities.ForEach, then it doesn’t give an error.
Is this a known issue or something I’m not doing correctly?
Complete error message:
Error Message
E:\data\UnityProjects\TestECS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\Types\TypeManager.cs(1000,17): Burst error BC1001: Unable to access the managed method object.Equals(object)
from type Unity.Rendering.FrozenRenderSceneTag
at Unity.Entities.TypeManager.Equals(ref Unity.Rendering.FrozenRenderSceneTag left, ref Unity.Rendering.FrozenRenderSceneTag right) (at E:\data\UnityProjects\TestECS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\Types\TypeManager.cs:996)
at Unity.Entities.EntityCommandBuffer.IsDefaultObject(ref Unity.Rendering.FrozenRenderSceneTag component, ref int hashCode) (at E:\data\UnityProjects\TestECS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\EntityCommandBuffer.cs:1055)
at Unity.Entities.EntityCommandBuffer.Concurrent.AddSharedComponent(Unity.Entities.EntityCommandBuffer.Concurrent* this, int jobIndex, Unity.Entities.Entity e, Unity.Rendering.FrozenRenderSceneTag component) (at E:\data\UnityProjects\TestECS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\EntityCommandBuffer.cs:1813)
at AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0.OriginalLambdaBody(AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0* this, Unity.Entities.Entity entity, int entityInQueryIndex, ref Unity.Transforms.Translation pos) (at E:\data\UnityProjects\TestECS\Assets\TestReZeroing\Scripts\AvoiderSystem.cs:44)
at AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0.IterateEntities(AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0* this, ref Unity.Entities.ArchetypeChunk chunk, ref AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0.LambdaParameterValueProviders.Runtimes runtimes)
at AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0.Execute(AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0* this, Unity.Entities.ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex)
at Unity.Entities.JobChunkExtensions.JobChunk_Process1<AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0>.ExecuteInternal(ref Unity.Entities.JobChunkExtensions.JobChunkData
1<AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0> jobData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) (at E:\data\UnityProjects\TestECS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\IJobChunk.cs:203)
at Unity.Entities.JobChunkExtensions.JobChunk_Process1<AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0>.Execute(ref Unity.Entities.JobChunkExtensions.JobChunkData
1<AvoiderSystem.<>c__DisplayClass_OnUpdate_LambdaJob0> jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) (at E:\data\UnityProjects\TestECS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\IJobChunk.cs:193)
While compiling job: System.Void Unity.Entities.JobChunkExtensions/JobChunk_Process1<AvoiderSystem/<>c__DisplayClass_OnUpdate_LambdaJob0>::Execute(Unity.Entities.JobChunkExtensions/JobChunkData
1&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)