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
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
- [Linux] Touch freezes in Player when any mouse button is clicked
- UnityEngine.Rendering.Volume.OnEnable() is called twice before OnDisable() creating multiple copies of the same volume when a volume is enabled right after Domain Reload when entering Play Mode
- Hinge Joint transforms are reset when toggling the "useMotor" property
- Motion Vector texture reports incorrect Mesh data when Mesh is coming from off-screen
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