Search Issue Tracker

By Design



Found in





Issue ID




[Windows] UnityPluginLoad is not called when the Native plug-in is embedded



Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Build And Run
4. Observe the Console window in the Editor

Expected result: Message Log with text similar to this “D3D_FEATURE_LEVEL_9_1” appears in the Console
Actual result: Message Log similar to this “WindowsPlayer "DESKTOP-0EC44FF" D3D_FEATURE_LEVEL_1_0_CORE“ is seen in Console

Reproducible with: 2021.3.27f1, 2022.3.1f1, 2023.1.0b21, 2023.2.0a18

Reproducible with devices:
VLNQA00332, Samsung Galaxy XCover4 (SM-G390F), Android 9, CPU: Exynos 7 Quad 7570, GPU: Mali-T720
VLNQA00325, Samsung Galaxy Note10 (SM-N970F), Android 12, CPU: NOT FOUND, GPU: Mali-G76
VLNQA00318, Oneplus OnePlus 7 Pro (GM1913), Android 11, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00231, Samsung Galaxy A5(2017) (SM-A520F), Android 8.0.0, CPU: Exynos 7 Octa 7880, GPU: Mali-T830
VLNQA00231, Huawei HUAWEI Mate 20 Pro (LYA-L29), Android 9, CPU: HiSilicon Kirin 980, GPU: Mali-G76
VLNQA00379, Oculus (Quest 2), Android 10, CPU: Snapdragon XR2, GPU: Adreno (TM) 650

Reproduces on: Windows 10 Enterprise 21H2

- Project has a Native plug-in embedded, as per this manual: [|]
- No UnityPluginLoad seems to be called, which is supposed to happen according to this [|]
- For results of the GetFeatureLevel method it's Logged in D3D11Native.cpp. This currently returns a test value 1_0 core when not initialized at all
- In UnityPluginLoad this is set to 9_1. It's documented in [|], so the user would expect the value returned to be D3D_FEATURE_LEVEL::D3D_FEATURE_LEVEL_9_1

  1. Resolution Note:

    UnityPluginLoad and UnityPluginUnload are only called for pre-compiled native plug-ins, not for IL2CPP C++ source code plug-ins. Neither UnityPluginLoad nor UnityPluginUnload is expected to be called in this case.

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.