Search Issue Tracker

Fixed

Votes

0

Found in [Package]

preview.18 - 0.2.0, preview.17 - 0.5.0

Issue ID

1213771

Regression

No

[Entities] Cannot add Script to a Game Object if there is a comment after [GenerateAuthoringComponent]

Package: Entity Component System (ECS)

-

Reproduction steps:
1. Open project in "MyRepro.zip"
2. Notice that the Script "RotateTag.cs" has a comment at line 3 after [GenerateAuthoringComponent]
3. Try attaching the Script to any GameObject

Expected result: the Script will be attached
Actual result: a "Can't add script behaviour <scriptName>. The script needs to derive from MonoBheaviour!" error occurs

Reproducible with: Entities preview.4 - 0.3.0 (2019.3.0b11), Entities preview.17 - 0.5.0 (2019.3.0f6, 2020.1.0a16)
Not reproducible with Entities preview.17 - 0.5.0 (2020.1.0a21)
Could not test with: 2017.4 because there is no Package Manager, 2018.4, 2019.2 because [GenerateAuthoringComponent] is available only in preview.18 - 0.2.0 and above

Notes:
1. Removing the comment after [GenerateAuthoringComponent] resolves the issue
2. 2019.3.0b11 is the first affected version because it is the first to support Entities 0.2.0 or above (0.3.0 is available in 2019.3.0b11)
3. Issue does not reproduce in 2020.1.0a17 and higher alpha versions

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.