Search Issue Tracker

Fixed in 0.51.0-preview.32

Votes

0

Found in [Package]

0.51.0-preview.32

Issue ID

1428324

Regression

No

Errors in Console "Exception: This method should have been replaced by codegen" when in Play Mode with Entities package imported

Package: Entity Component System (ECS)

-

How to reproduce:
1. Open the attached project "CGP_1428324"
2. Enter Play Mode

Expected result: No exceptions in Console
Actual result: "This method should have been replaced by codegen" exceptions in Console

Reproducible with: 0.51.0-preview.32 (2020.3.30f1, 2020.3.36f1)
Not reproducible with: 0.51.0-preview.32 (2021.3.4f1, 2021.3.5f1 )
Can't test with: 2022.1 or later versions (the Entities package is only supported on Unity Editor versions 2020.3.30f1+ and 2021.3.4f1+)

Reproducible on: macOS 12.3.1 (Intel)

Note:
- Downgrading (or upgrading) the Editor version, while the package is installed and changing the version back solves the issue e. g. ( 2020.3.34f1 > 2020.3.33f1 > 2020.3.34f1) (changing the version back isn't necessary for the issue to resolve)
- Checking the "Add missing partial keywords to systems" option (DOTS > DOTS Compiler > Add missing partial keywords to systems) and then unchecking it and restarting Unity Editor also solves the issue
- Same issue if importing the Hybrid Renderer package (because the Entities package is a dependency)

  1. Resolution Note (fix version 0.51.0-preview.32):

    Fixed in: 0.51.0-preview.32 (2021.3.4f1)

Comments (2)

  1. snoche

    Sep 26, 2022 23:23

    I found the same issue with latest version 0.51.1-preview.21 and Unity 2021.3.10f1

    I have tried the fix checking DOTS Compiler but did not help for me.

    Exception: This method should have been replaced by codegen
    LambdaForEachDescriptionConstructionMethods.ThrowCodeGenException[TDescription] () (at Library/PackageCache/com.unity.entities@0.51.1-preview.21/Unity.Entities/CodeGeneratedJobForEach/LambdaJobDescription.cs:149)

  2. coffeesmoker81

    Jul 26, 2022 21:33

    I just ran into the issue in preview 32 where this was supposed to be fixed and it still happened. The workaround as described above (checking and then unchecking the add missing partial keywords) did fix it, but it is still happening contrary to the resolution note above.

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.