Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4.0f1
2018.4.0f1
2019.1.5f1
2019.2.0a1
2019.3.0a1
2020.1.0a1
Issue ID
1185125
Regression
No
BadImageFormatException is thrown when calling GetCustomAttributes on certain MemberInfo instances
To reproduce:
1. Open attached project ("case_1185125.zip")
2. Press Play
3. Observe Console
Expected result: No errors are thrown
Actual result: "BadImageFormatException" errors are thrown
Reproducible in: 2017.4.33f1, 2018.4.10f1, 2019.2.8f1, 2019.3.0b5, 2020.1.0a7
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Bunch of "TargetParameterCountException" errors thrown in the Editor Console when opening the "Adaptive Probe Volumes" tab in the "Lighting" window
- Non-removable serialized data for a renderer feature still appears even when the renderer feature is deleted
- URP Cascaded Shadows do not have a falloff in Player when the Player is built not in Development Mode
- Grid in animation preview window is rendered on top of the object
- WebGPU Graphics.RenderPrimitives fails on MeshTopology.Quads with Validation errors when exceeding 64k vertices
Resolution Note:
This is an unsupported use of Unity, and this is most likely not going to be fixed. If you are interested in gathering the types with a specific attribute I would recommend using the TypeCache https://docs.unity3d.com/2019.2/Documentation/ScriptReference/TypeCache.GetTypesWithAttribute.html
Please use some sort of filtering to only scan assemblies that could have the attribute you are searching. For example, there is no need to scan the Unity assemblies to the class libraries.
Issue tracked in upstream mono project: https://github.com/mono/mono/issues/17278