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

Scripting

-

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

  1. 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

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.