Search Issue Tracker

Active

Under Consideration for 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

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.