Search Issue Tracker
By Design
Votes
0
Found in
2021.3.27f1
2022.3.1f1
2023.1.0b21
2023.2.0a18
Issue ID
UUM-39816
Regression
No
[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
Notes:
- Project has a Native plug-in embedded, as per this manual: [https://docs.unity3d.com/Manual/WindowsPlayerIL2CPPScriptingBackend.html|https://docs.unity3d.com/Manual/WindowsPlayerIL2CPPScriptingBackend.html]
- No UnityPluginLoad seems to be called, which is supposed to happen according to this [https://docs.unity3d.com/Manual/NativePluginInterface.html|https://docs.unity3d.com/Manual/NativePluginInterface.html]
- 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 [https://docs.unity3d.com/Manual/NativePluginInterface.html|https://docs.unity3d.com/Manual/NativePluginInterface.html], so the user would expect the value returned to be D3D_FEATURE_LEVEL::D3D_FEATURE_LEVEL_9_1
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
- Sprite Atlas remains loaded in memory after scene change or unloading assets
- Decompressing a DeflateStream under IL2CPP misses a few bytes
- Referred style sheet stays dirty after saving when using the UIBuilder
- The Height map Amplitude is not working when using HDRP/LayeredLit
- Infinite inertial tensor rotation values are not discarded (both AB and RB)
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.