#How to use RegisterGenericSystemTypeAttribute?

1 messages · Page 1 of 1 (latest)

sage prawn
#

I'm quite puzzled by the current support of generic ISystem. Even if I put a constraint where T : unmanaged, IComponentData on the system, T still:

  1. Can't be used in SystemAPI.QueryBuilder().WithAll<T>()
  2. Can't be an argument of IJobEntity.Execute

Then how generic ISystem could be a practical thing?

storm hull
#

um. why would you want a system to be an argument to a job

#

but @tidal dawn for the #1 part

#

unless you mean that T can't be an argument to IJE execute, in which case i guess that would maybe be the same bug

tidal dawn
storm hull
#

curious, do generic systembase's work with those things?

#

i would think they'd be pretty similar

tidal dawn
#

Same rules on SystemBase and ISystem

storm hull
#

ah ok, i feel less bad then

tidal dawn
#

The remaining difference in sourcegen was fixed with your Generic ISystem support 😉

#

You have no idea how much code that cleaned up 😆

sage prawn
#

That seems a lot of work just to make a working generic system.

#

Btw, should we have 1 or 2 examples for generic system? The document doesn't exist except that changelog so that's why I'm being confused about how practical generic system might be.

sage prawn
storm hull
#

As you can see, we aren't super convinced that generic systems in general, managed or unmanaged, should be at the top of our priority list. I just implemented them because everybody was yelling about how generic systembase's worked and generic isystem's didn't. We might get around to fixing the codegen stuff for it, since it's true it's not fun to do stuff without that. I'd be pretty surprised if we came out with a sample for them though.

sage prawn