#generic job results in a bug

1 messages · Page 1 of 1 (latest)

normal mason
#

Hello,
I have a generic job that results in a weird error message in another class. The Jobs looks like this;

[WithNone(typeof(UnregisteredTag))]
public partial struct InputBuildingJob<T> : IJobEntity where T : unmanaged, IInventoryItem
{
    [BurstCompile]
    private void Execute(ref DynamicBuffer<InputComponent> inputs, ref DynamicBuffer<T> inventory)
    {     }
}``` 

The error message I get is this:

`Assets\Scripts\ECS\Authoring\BuildingAuthoring.cs(1,1): error SGICE003: This error indicates a bug in the DOTS source generators. We'd appreciate a bug report (Help -> Report a Bug...). Thanks! Error message: 'System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. |--|    at Unity.Entities.SourceGen.SystemGenerator.Common.JobEntityDescription.IsLessAccessibleThan(Accessibility accessibility1, Accessibility accessibility2) |--|    at Unity.Entities.SourceGen.SystemGenerator.Common.JobEntityDescription.CreateJobEntityParam(IParameterSymbol parameterSymbol, Boolean performSafetyChecks, List`1 queryAllTypes, List`1 queryChangeFilterTypes) |--|    at Unity.Entities.SourceGen.SystemGenerator.Common.JobEntityDescription..ctor(StructDeclarationSyntax candidate, SemanticModel semanticModel, Boolean checkUserDefinedQueryForScheduling) |--|    at Unity.Entities.SourceGen.JobEntity.JobEntityGenerator.Execute(SourceProductionContext context, Compilation compilation, StructDeclarationSyntax candidate, Boolean checkUserDefinedQueriesForSchedulingJobs)'.`'

The class is just a Authoring and when I remove the generic from the job the error message won't show up.
Is this really a bug or is my job wrong?
worn ridge
#

at least, most of it

#

you need to write your job as IJobChunk

normal mason
#

Ah okay thank. I will try this

normal mason
#

It's working. Thank you very much

pearl panther
#

@hollow flume we could at least have a friendlier error, no?