Search Issue Tracker
By Design
By Design in 6000.5.X
Votes
0
Found in
6000.0.68f1
6000.3.10f1
6000.4.0b10
6000.5.0a7
Issue ID
UUM-135507
Regression
No
SetComponentEnabled uses class instead of struct when constraining Enableable Component type
Reproduction steps:
1. Open the attached project "ReproProj"
2. In Project window search for “Baker“
3. Open “Baker.cs“ in IDE
4. Find exact line “public void SetComponentEnabled<T>(Entity entity, bool enabled) where T : struct, IEnableableComponent“
5. Note that it contains “struct“
6. In Project window search for “EntityCommandBuffer“
7. Open “EntityCommandBuffer.cs“ in IDE
8. Find exact line “public static void SetComponentEnabled<T>(this EntityCommandBuffer ecb, Entity e, bool value) where T : class, IEnableableComponent, new()“
9. Observe it
Expected result: struct exists instead of class
Actual result: class is present
Reproducible with: 6000.0.68f1, 6000.3.10f1, 6000.4.0b10, 6000.5.0a7
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
Note:
- One indicates that the function can work on managed components while the other indicates the opposite
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.
Resolution Note (6000.5.X):
Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.