So I repeatedly stumbled upon the very sparsely documented Subsystem-Module
Now I built a small test-subsystem but it seems to me the whole thing isn’t working for ‘public’ users unless either doing a pretty ugly workaround via reflection and setting up the protected internal fields of the concrete SubsystemDescriptorWithProvider or without having access to the source-code.
Or I’m just to sleepy atm to see how to use it correctly.
As there is only one older thread inactive thread in the forums where no unity-member ever answered, can someone offical confirm or refute that this is pretty much unusable for everyone not having bought source-access? And if so why this is in the public docs for so long?
Thanks in advance.
The error you get when not being able to set the internal protected fields from the concrete inherited descriptor in it’s base-class fields is:
“InvalidOperationException: Invalid descriptor - must supply a valid providerType field!
UnityEngine.SubsystemsImplementation.SubsystemDescriptorWithProvider`2[TSubsystem,TProvider].ThrowIfInvalid () (at <8485f79235284c01bd95016df64cecb4>:0)”
Edit: Not a problem if it is indeed for internal use only, but in that case you probably want to remove it from the docs altogether.
I already have a custom “subsytem”-package of my own for all sorts of long-living subsystems which works for editor / runtime or both. Was just wondering if there’s an actual built-in solution which perhaps even performes better than my “on top” solution.