-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic components and tags types are not supported and throw exception on usage. #53
Comments
My plan to support generic component / tag types: [GenericInstanceType("comp-int", typeof(int))] // register GenericComponent<int>
public struct GenericComponent<T> : IComponent {
public T Value;
}
[GenericInstanceType("tag-int", typeof(int))] // register GenericTag<int>
[GenericInstanceType("tag-string", typeof(string))] // register GenericTag<string>
public struct GenericTag<T> : ITag { } Note: The first paramater e.g. I guess I will finish this today an publish a nuget package. |
Just published package 2.1.0 supporting Generic components and tags types on nuget. In case of a missing attribute an exception is thrown like:
The inner exception describes how to fix the issue:
|
Note Beside this their performance and memory characteristics are same as non generic types. |
The issue came up in: #51 (comment)
Generic component and tags type are not supported in library version <= 2.0.0.
E.g.
These types are not registered as component / tag type and throw an exception when using them.
The text was updated successfully, but these errors were encountered: