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

Core Runtime

-

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

  1. 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.

  2. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.