Search Issue Tracker

Won't Fix

Votes

2

Found in

2018.4

2020.1.9f1

2021.1

Issue ID

1295316

Regression

No

Unity drawing an unused Namespace's Struct when creating a Struct with the same name

Serialization

-

Reproduction steps:
1. Open attached Project "StructIssue"
2. Attach the "BuggedStruct" Script to any GameObject

Expected result: The Public Struct "AABB" is Exposed to the Inspector as the Namespace Unity.Math is not used
Actual result: The Struct "Unity.Math.AABB" is Exposed to the Inspector and multiple errors are thrown to the Console

Reproducible with: 2018.4.30f1, 2019.4.16f1, 2020.1.17f1, 2020.2.0b14, 2021.1.0a9

  1. Resolution Note (2021.1.X):

    For the inspector to work properly type names cannot match those of the internal types from SerializedPropertyType, even when they are inside another namespace. In this case 'AABB' is used for BoundsInt. Doing extra checks to support this would slow down the inspector, so instead we recommend to avoid these type names.

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.