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
- Terrain has tint from the directional light source when a normal map is enabled on iOS and Android Platforms
- [HDRP] Custom pass before post process
- [2D] Generate Outline will turn sprites a solid black
- Floating Editor Windows can become completely inaccessible when disconnecting monitor on multi-monitor setup
- Floating Editor Windows resize to smallest size when disconnecting monitor on multi-monitor setup
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