Is it possible to tell IJE that a Component is optional, without using Aspects? I thought about using [WithAny], but then I can't use the OptionalComp c3 in the Execute()
private partial struct Job1 : IJobEntity
{
private void Execute(MandatoryComp1 c1, MandatoryComp2 c2, OptionalComp c3)
{
// Do something with c1 & c2
// If we have c3 then do something with it as well, if not no problem...
}
}
Is there any performance cost for using the Optional Attribute for Aspects? It would be interesting if anyone knows, because I couldn't find any information on it
In case anyone is interested how to do it with Aspects:
https://forum.unity.com/threads/how-to-check-if-iaspect-has-an-optional-component.1389807/