Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2021.2.11f1
2021.3
2022.1
2022.2
Issue ID
1405720
Regression
No
Plugins are not filtered when using Assembly Definition Define Constraints
Reproduction steps:
1. Open the attached project "AssemblyBug.zip"
2. Go to File > Build Settings and press Build
3. Go to the Build folder and then navigate to "AssemblyBug_Data > Plugins > x86_64"
4. Observe the "x86_64" folder
Expected result: The folder contains only one plugin that is needed for built Platform
Actual result: The folder contains 4 different plugins
Reproducible with: 2019.4.38f1, 2020.3.33f1, 2021.3.0f1, 2022.1.0b16, 2022.2.0a10
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
Define Constraints set on Assembly Definitions are only for the compilation of that to a dll. Those will not affect the native Plugins that is underneath ths Assembly Definition.
On Managed Plugins theres a Define Constraint, that is thought of as the [Conditinal] on the assembly level. Native plugins sadly dont support this feature.
What is supported is IncludeInBuildDelegate callback on plugins:
https://docs.unity3d.com/2020.1/Documentation/ScriptReference/PluginImporter.IncludeInBuildDelegate.html
That you can use