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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
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