Search Issue Tracker
By Design
Votes
0
Found in
2021.3.25f1
2022.2.20f1
2023.1.0b17
2023.2.0a15
Issue ID
UUM-35592
Regression
Yes
The main object name does not match the asset filename when FileUtil.CopyFileOrDirectory is used
Reproduction steps:
1. Open the attached “ASDQWE” project
2. In the top menu select Test > CopyFile
3. In the Project Window select “Assets/SourceMaterialFolder/FileUtilCopyFileMaterial.mat” material
4. In the Inspector Window observe the material’s name
Expected result: The asset file name matches the main object name (FileUtilCopyFileMaterial)
Actual result: The asset file name (My Test Material) does not match the main object name (FileUtilCopyFileMaterial) and a warning is displayed stating to fix this issue
Reproducible with: 2021.2.0a18, 2021.2.19f1, 2021.3.25f1, 2022.2.20f1, 2023.1.0b17, 2023.2.0a15
Not reproducible with: 2020.3.48f1, 2021.2.0a17
Reproducible on: Intel MacOS 13.3.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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
Hi,
This situation is expected behavior.
Non-asset-database methods, such as FileUtil.CopyFileOrDirectory(), don't handle assets' internal properties, such as asset names. Meaning, FileUtil.CopyFileOrDirectory() will just do a simple copy of the file.
Regards,
Povilas
Customer QA Team