Search Issue Tracker
By Design
Votes
5
Found in
2022.3.59f1
6000.0.40f1
6000.1.0b8
6000.2.0a4
Issue ID
UUM-98843
Regression
Yes
Warning "Could not load the file 'NiceIO'" when entering the Play Mode
h1. IMPORTANT
{{Before moving this from the Visual Scripting (VS) team to Scripting, I uploaded a .unitypackage that does not require VS to be installed to reproduce the issue. It mimics the behavior of the VS package to trigger the warning users are encountering. Our logic worked prior to the change of the TypeCache back-end, this is confirmed by the bisection requested for this bug report. Please read my comment below for more information.}}
Reproduction steps:
1. Open the attached project "TestProject"
2. Open the “/Assets/Samples/XR Interaction Toolkit/2.4.3/Starter Assets/DemoScene.unity” Scene
3. Enter the Play Mode
4. Observe the Console window
Expected result: The warning “Could not load the file 'NiceIO'“ is not displayed
Actual result: “Could not load the file 'NiceIO'“ warning is seen
Reproducible with: 1.8.0 (2022.3.0f1, 2022.3.6f1, 2023.1.7f1, 2023.2.0b3)
Not reproducible with: 1.7.8 (2022.2.1f1), 1.8.0 (2021.3.29f1, 2022.2.21f1)
Reproduces on: Windows 10 Enterprise 21H2
Notes:
- Sometimes requires opening SampleScene and then repeating steps 2-4 to reproduce
Comments (1)
-
ArhamAbbas
Jan 20, 2025 22:43
It usually happens when building for Android.
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
- Test Runner’s vertical scrollbar overlaps with the up and down arrows and upper toolbar tabs when the window is minimized
- The Input Field view is not updated when deleting lines of text
- The scrollbar does not respect empty lines in the Input Field
- “Texture Atlas Viewer“ button text overlaps another button when the UI Toolkit Debugger is narrowed
- Thresholds are no longer automatically calculated after deleting Motion fields in Blendtrees
Resolution Note:
This is actually behaving as designed in the runtime:
- NiceIO is a dependency of an assembly that is loaded as part of Android editor extension, but it is not a "scripting" assembly that is explicitly loaded by Unity. So until some code is jitted that requires this assembly to be loaded, Unity is not going to load it.
- Before incremental type cache was implemented we used to traverse all the types, methods and their attributes from loaded assemblies on each domain reload. This actually triggered loading Nice.IO when Android extension was being traversed. This is not the case anymore.
- The assembly is not in the search path, but is in the same directory as Unity.Android.Gradle.dll. So Assembly.Load can't resolve it when invoked by user code, but when it is loaded in order to JIT Unity.Android.Gradle.dll, the runtime will actually look into the directory it was loaded from and will load NiceIO.dll from there.
So I would suggest modifying the user code to actually look into the directory the referencee is loaded from if the assembly fails to load from name.